An urgent warning has been issued by Calderdale police after a train narrowly missed hitting a young boy playing on the railway line.
The Calderdale Police force received a report yesterday that two young boys were playing on the railway line in Walsden.
The train had to use its emergency brake to avoid hitting one of them.
Eight police officers, Network Rail and the police helicopter were called to check the area.
A spokesperson for Network Rail said: "Trespassing on the railway is illegal and dangerous. You could be taken to court and face a £1000 fine.
"For this reason, when we see someone trespassing, we have to stop all trains in the vicinity to make sure everyone is kept safe. This not only delays nearby trains, but also has a knock-on effect on trains across the network.
"Certain parts of the railway, including stations, underpasses and level crossings, are open to the public. But when people go onto the tracks, embankments or other areas, they are trespassing.
"When people trespass on the railway and vandalise our property, we need to repair any damage and make sure the railway is safe before allowing trains to run again. This causes delays for passengers. Vandalism includes graffiti, litter, fly-tipping and damage to fences, signs and tracks."
If you see someone trespassing on the railway, please call British Transport Police (BTP) on 0800 40 50 40, text 61016 or dial 999.
Keep up-to-date with all the latest news and breaking incidents in Halifax - join our dedicated Facebook group here.