Darren Robertson-Wilson, a level crossing manager at Network Rail, said: “Level crossings are safe when people follow the instructions, remain alert and cross without stopping, but the consequences of distraction or deliberate misuse can be devastating.

“The behaviour captured at Methley North shows why this campaign is so important. Stopping on a crossing to take a photograph or treating the railway as somewhere to play puts lives at risk.

“We work with schools and communities to make young people aware of the risks and help them make safer choices. There are no second chances on the railway.”

He added: “Many people do not realise that seemingly everyday behaviour, such as looking at a mobile phone, wearing headphones or talking to friends, can reduce their awareness and place them in danger at a level crossing.”

Ch Insp Joe Gorman, of British Transport Police, said children were increasingly “distracted by mobile phone use”.

“Level crossings are safe when used correctly, but they can become incredibly dangerous in an instant if people ignore warnings, take risks or become distracted,” he said.

“We continue to see incidents involving young people at crossings, whether distracted by mobile phone use, peer pressure or deliberate misuse, but what may seem like harmless behaviour can have devastating consequences.

“That’s why campaigns like this are so important, so that young people are educated about the dangers of the railway and they can make safer decisions. We urge young people to respect the railways and keep safe.”