The rail worker races down the line to stop an approaching train after a carriage comes off the track in a collision with cattle.
The driver of a train derailed by a herd of cows managed to avert a potential disaster by running down the track to halt an oncoming engine.
The collision on the Ashford to Canterbury service in Kent caused the front carriage to come off the track.
It also knocked out the radio and so the driver jumped out of his cab and ran down the line to stop an approaching train.
He then used the radio on that train to alert the signaller and turn off the power to the line.
Five cows were killed in the crash although no passengers were hurt.
Around 70 people on board were evacuated from the train and taken to a nearby village hall where alternative transport was arranged.
A Southeastern spokesman said: “On Sunday evening on 26 July, a train travelling between Ashford and Canterbury West was involved in an incident near Chilham station where it collided with livestock that had strayed onto the railway line meaning the train became derailed.
“We would like to thank our driver who acted quickly after his train collided with the cows.
“He realised at this point his radio had stopped working so he jumped out of the cab and ran down the track to halt an approaching train.
“He was then able to contact the signaller through the radio of this train to switch off the power to the line.”
“We can confirm no one was injured in this incident and all passengers on board were taken from the train to a nearby village hall where they were given refreshments and buses and taxis were arranged to take them home.
“We would like to thank the local residents of the village of Godmersham who opened up the village hall for us so late at night and helped provide warm drinks for our passengers.”
Following the accident, one of the passengers, Jonathan Calder, tweeted a picture from inside the train, which showed the carriage in front of his at an angle, with the right-hand side raised and no longer on the rails.
He said: “Everyone is fine but this train is going nowhere. Front coach derailed.”
Network Rail is at the site to investigate if any damage has been caused to the track.
Southeastern has said the line is likely to remain closed until Wednesday at the earliest while the carriages are removed using a special crane.