Video report by ITV Wales reporter Megan Boot
People who misuse railway level crossings are 'gambling with lives', rail officials warn, as figures show a rise in incidents.
Since the beginning of this year, Network Rail has seen an increase in level crossing misuse around south-west Wales, including a collision between a car and a moving train.
Now, shocking videos and photographs released jointly by Network Rail and British Transport Police lay bare some of the risks people are willing to take.
In one photograph, youngsters are seen posing for photographs on a Vale of Glamorgan railway line - one of several similar examples recently.
In another example, CCTV footage released by British Transport Police shows a near-miss at Glan-y-Mor Elias level crossing in Conwy County Borough.
A person can be seen running out on to the tracks, before noticing the oncoming train and hastily retreating.
In another, a woman trying to beat an approaching train is caught crashing her car into the barrier at Onibury level crossing, between Leominster and Shrewsbury.
The crash cost Network Rail more than £34,000 in disruption and damages to the crossing, as well as causing severe delays to train services in both Wales and England.
The woman abandoned the vehicle on the crossing and fled the scene on foot, failing to report the incident to the British Transport Police until 10 hours later.
She was later disqualified from driving for six months, given community service and fined more than £400.
Woman trying to beat train crashes into level crossing barrier
Ronnie Gallagher, from Network Rail, said: "You should never try to rush to beat a train over a level crossing.
"The risk to your life, and that of others, is too great to gamble with on the railway. We would like remind all level crossing users that they need to give way to approaching trains and listen out for the train horn."
Mr Gallagher said there are a 'number of factors' behind the increase in such incidents.
"We have seen an increase in use at level crossings across the board - particularly at footpaths - since March, when the initial coronavirus restrictions were put in place," he said.
"We've seen people travelling further, travelling new routes and this is putting people into contact with level crossings for the first time."
Shocking CCTV footage captures trespasser's near-miss with speeding train
British Transport Police inspector Beata Evans added: "Each year, hundreds of people take risks on and around the railway, resulting in tragic consequences and life-changing injuries. "People should never anticipate when the next train is due - the reduced number of passenger trains running on the network allows more freight services to operate, which can travel at any time of day or night. "We are continuing to proactively patrol the railway network across Wales. Safety is our number one priority and we're reminding everyone of the importance of taking care around the railway."