Photos of a young boy using the light from a fast-food restaurant to study on a wooden bench went viral, prompting local authorities to intervene.
Student Joyce Gilos Torrefranca spotted the young boy, who has now been identified as Daniel Cabrera, sitting on the sidewalk in Cebu, Philippines.
Torrefranca uploaded photos of the boy to Facebook and they quickly clocked up more than 60,000 shares.
After the photos went viral, the local social welfare officer visited the Cabrera family to find out what assistance they could offer the family, reported ABS-CBN News.
Torrefranca told ABS-CBN News: "For me as a student, it just hit me a lot, like big time. I seldom go to coffee shops to study. And then this kid, he doesn't have anything but he has dedication to study."
ABS-CBN News found the boy in a nearby restaurant and learned he has no permanent home because his family's house was destroyed by a fire, which is why he had been studying under the restaurant's lights every evening.
One Facebook commenter, Giomen Probert Ladra Alayon, wrote on the photo: "I was able to talk to this kid moments after Joyce took this snapshot.
"This kid's perseverance in studying makes this picture such an inspiration. Despite the lack of personal space or inadequate lighting, still he chose to study."
Cabrera who is said to be in third grade, so is likely to be eight or nine years old, told ABS-CBN News that despite his current living situation, he is "determined to finish his studies", so he can help his family as his mum is a widow and his sibling is sick.
After finding out the name of the boy and learning that he was now getting assistance, Torrefranca wrote on Facebook: "I didn't think that a simple photo can make a huge difference.
"Thank you guys for sharing the photo. With that, we were able to help Daniel in reaching his dreams.
"I hope Daniel's story will continue touching our hearts so that we will always be inspired and motivated in every situation we face in life."