A lorry came within inches of hitting a 120mph (193kmph) mainline train after skidding on ice in County Durham, police have said.
The HGV was approaching the East Coast mainline level crossing at Hett Mill on Sunday when it slid down a hill.
Durham Police said the driver was moving cautiously but could do little on the ice.
The vehicle came to rest against the closed barrier just as a mainline train passed by at 120mph (193kmph).
A police spokesman said: "If the HGV was travelling any faster and the driver not being cautious the outcome could have been very different.
"Luckily, albeit shaken, the driver of the HGV was uninjured."
Rail services through the area were delayed whilst the barrier was repaired.
The spokesman said: "This is a stark reminder that you must take extra care in icy conditions."