A driver was lucky to walk away after her car smashed into a train at a level crossing in South Yorkshire, which had not been fitted with the latest safety features.
The car collided with a stationary freight train at a crossing near Doncaster earlier this year, where the barrier was up and no warning lights or alarm were active.
The car was written off following the crash on Stainforth Road in January but the driver miraculously escaped with only scratches and bruises.
An investigation has found the terrifying incident could have been avoided had the crossing been fitted with the latest safety features, which prevent gates from reopening while a train is still present.
The Rail Accident Investigation Branch (RAIB) has urged Network Rail to identify other level crossings where such a risk exists and to take steps to improve safety at those locations.
The safety watchdog also recommended that design standards are altered to prevent this happening at new remotely-monitored level crossings.
The train had stopped with its rearmost wagon blocking the carriageway when the collision happened, on January 11, at around 5.50am.
No warning devices were operating and it was dark at that time, meaning the car driver did not see the train until it was too late.
The crossing's control circuits dated back to its original installation in 1974 and had not been modified to incorporate later features ensuring trains are clear of a crossing before it reopens.
"The level crossing risk assessment process used by Network Rail did not identify and address the risk of the original design of control circuit remaining in service without it having later design features intended to improve safety, states the RAIB report, which was published today.
A spokeswoman for Network Rail said: "We take safety incidents such as the incident at Stainforth Road level crossing extremely seriously and have worked alongside the RAIB on the investigation.
"We work hard to prevent incidents like this happening and have already started to implement some of the recommendations made by the RAIB report to try and stop similar incidents from occurring again in the future."