A scared dog was hit by a car then became trapped alongside rail tracks as trains approached.
Frightened crossbreed Delilah bolted from her owner after being spooked by a bang designed to deter birds from farmland.
She was rescued in a dramatic RSPCA operation that halted Merseyrail trains.
READ MORE: Bold Street restaurant named among best in the world
Delilah fled from owner Claire Fishlock, after being startled while out walking in Pensby on Thursday.
The two-year-old was hit by a car nearby and continued running in panic.
She was spotted a couple of hours later by another walker - five miles away near Upton Station.
The terrified dog was seen running towards a metal fence at the side of the track after a train had sounded its horn.
Attempting to escape, Delilah was trying to get her head through gaps in a metal fence leading to fears she would either get stuck or, if she bolted again, would be hit by a train.
The RSPCA was made aware of her plight and launched an operation with Merseyside Fire and Rescue Service.
Animal Welfare Officer Katie Glenn, one of those involved in the rescue effort, said: “I used my grasper and a lead to hold Delilah still so she would not bolt into the train track while the fire crew went to get permission from Network Rail to allow us to close the line so we could get to the dog from a gate at the other side of track.
“They closed down the line and we were able to safely rescue Delilah who was clearly terrified.
“Fortunately she had a collar with her owner's mobile number on so I called Claire to tell her we were in the middle of rescuing her dog and she came to the scene.
“A crew from Saughall Massie Fire Station and train workers were great in helping save the pooch and it was a great team effort.
“I must admit I did think I have heard of adverse weather delaying trains but never a dog.
“It was so nice to see her reunited with her owner Claire, who was obviously worried sick when she ran off, and she continued running for five miles along roads and the train track so she was clearly terrified - she was a lucky dog really.”
Speaking of the ordeal, Claire said: “Delilah is a Romanian rescue dog so is nervous but we have been working on her recall and she has been doing so well. This loud bird deterrent made a massive bang and then she ran off.
“I then heard a thud and knew she had been clipped by a car and so went in search of her but to no avail and I was really upset thinking we would not see her again.
“Delilah still seems a bit timid following her ordeal but she is getting better. I did quote the Tom Jones song ‘Why,why, why Delilah!’ when I got her home.
“She had a veterinary check and we think she just ran into a car but was not badly hurt - she really is lucky to survive the whole ordeal.
“I am so grateful for the team effort involved in saving Delilah - the RSPCA, fire service and Network Rail were fantastic and she is now getting lots of cuddles at home.”
Receive newsletters with the latest news, sport and what's on updates from the Liverpool ECHO by signing up here