Translink has warned that lives are at risk if “foolish” behaviour doesn’t stop on the Londonderry railway line.
The warning follows a near miss near Ballymoney on Wednesday night.
There have been 20 near misses on the Derry line and 79 across Northern Ireland since June.
Train drivers have used the emergency brake a number of times due to children playing “chicken.” Adults have also crossed the line by foot.
Ian Campbell, head of rail operations at Translink, said: “Throughout the school holidays there have been a great deal of pedestrian trespassing.
“A lot of children are crossing the railway by foot and it’s very alarming.
“In most cases children are climbing over the fences. Some people actually damage the fences to access to the railway.
“Our trains travel up to 90mph so they don’t stop immediately. They are not guaranteed to stop if someone is on the line.
“We want parents to be mindful of where their children are at all times. Some of them are playing chicken on the track and adults do cross the line by foot too.
“We do make prosecutions. We have made 41 prosecutions so far this year. This foolish behaviour needs to stop.”