Railway engineers turned dog rescuers after a wayward pooch found her way on to the tracks on the West Coast main line.
Asha the dog was spotted by Network Rail workers wandering on the railway line at Leighton Buzzard on Bank Holiday Monday.
Ben Johnson, Network Rail track engineer, said: “When we spotted the dog we all downed tools to try to stop her running on to the slow lines, which still had trains moving on them.
“It took us about half an hour to catch her. She was scared at first cowering in a bush.
“Three of us sat around near her and coaxed her out. We stroked her, gave her a cuddle and managed to calm her down.
“The main thing is she’s safe and well. Her owner was really grateful, too.”
Asha was then returned to her relieved owner, David James, who’d been looking for her for several hours.
The dog rescue took place during work to replace track between Bletchley and Leighton Buzzard as part of Britain's Railway Upgrade Plan.
More than 2,700 railway engineers worked around the clock to improve the railway for passengers and freight customers in the North West & Central Region.
Passengers can check and plan their journeys at www.nationalrail.co.uk.