A grandfather is being hailed a hero after dramatic CCTV footage emerged of him risking his life by jumping into the path of a speeding freight train to save his granddaughter.

The 62-year-old man arrived at Wentworthville station in Sydney, Australia, to pay for a ticket, Nine News reports.

Not realising the platform had a slight slant, his 18-month-old grandchild’s buggy rolled away from him and crashed face-first onto the train tracks.

In a matter of seconds, he is seen rushing and jumping onto the tracks, lifting the child and stroller back up onto the platform to her grandmother and mother – only to realise that a freight train is racing towards him.

Watch the dramatic footage:

Unable to climb back up onto the platform himself, the train blows its horn in warning and the man can be seen racing for his life down the tracks.

He finally makes it to the top of the platform – with seconds to spare – as the train zooms by.

Speaking with Nine News, acting inspector Paul Reynolds, summed-up the incident in just a few words: “Baby – very lucky. Grandfather – just as lucky.”