A citizen is being credited for possibly saving the life of a toddler who wandered onto a rooftop in Hamilton.

Hamilton police said officers were called to the King and Tisdale streets area at around 3:30 p.m. on Wednesday after receiving reports of a young child standing on the second floor roof of a home.

In a news release issued Friday, police said the little boy was inside his bedroom napping and somehow “squeezed out” of the window. A photo provided by police shows the toddler standing on the roof wearing nothing but a diaper. Videos of the ordeal also started circulating on social media.

A citizen who spotted the child, who is under the age of two, and ran inside the home. They were able to bring him back through the window to safety, police said.

“Hamilton police are thankful for the quick thinking actions of those who witnessed the incident, alerted the parents and quickly brought the child to safety,” the news release said.

Officers also issued a reminder to families to secure their windows and doorways when they aren’t in the room.

“It only takes a moment for a young child to put themselves in a dangerous situation,” police said.

Police are not investigating the incident as criminal.