British Transport Police have issued a warning after two youths were caught on camera on a Leicestershire level crossing while the barriers were down.
The youths ran across Narborough crossing as the red warning lights were flashing, officers said.
British Transport Police said drivers and pedestrians risk their lives by misusing level crossings.
Sgt Karen Barker said: "This is not only irresponsible, but could have had fatal consequences."
She added: "The dangerous act of crossing whilst the warnings are in place not only puts pedestrians own lives at risk, but also damages trains passing through at the time, potentially causing a derailment."
Richard Pedley, community safety manager for Network Rail, said: "This picture is very worrying.
"The lights at barriers at this crossing are there to keep people safe and there is no excuse for ignoring them in this way."