The incident was captured on camera in Medellin, Colombia, on the afternoon of June 19.
In the heart-stopping footage, the mother and son are seen waiting outside a construction company office in the Laureles Colonial building.
The curious toddler walks towards the railing, seen above a flight of stairs.
He puts his hands on what he thought was a glass panel.
But to the poor child’s surprise, he falls to his knees before going head first through the panel gap.
His mother, who was on her phone at the time and had only taken her eyes off him for a few seconds leaps into action and grabs the child’s leg.
Workers can be seen running out of the nearby offices to the woman, helping her to pull the child back over the barrier.
The delivery man, who can be seen exiting the lift with the pair, runs downstairs, presumably anticipating the child had fallen down.
Thankfully, the quick-thinking mum was only seconds away from tragedy.
It’s not confirmed whether the child was injured in the incident.
The CCTV footage was later uploaded to Reddit, with some users praising the mum and her reactions.
Others blamed her for not paying attention.
One person said: “Considering that there should be either glass or rails… this is a lawsuit waiting to happen.”
Another added: “It looks like there should have been glass. At first glance, the mom would have probably thought glass too.”
A third person who was just happy everyone was safe, commented: “I’m impressed how quickly both the mom and the guy in the helmet reacted.
“The bike messenger thought to go down the stairs nearly by instinct. Glad there was a good outcome.”