Five schoolgirls crossing the tracks had a narrow escape last week when a train missed them “by a whisker”.

The driver had to apply the emergency brakes to avoid hitting the 14-year-olds in the incident at Skerries Train Station which happened shortly after 10am.

Local Cllr Tom O’Leary (FG) said: “The train driver thought he hit them, it was that close. I am alerting parents and students to please pass the word how dangerous this activity is.

“They went on an adventure and it nearly ended in disaster.”

It is not clear whether the five teenagers, who were all in their school uniform, were playing a deadly game of ‘chicken’ or merely crossing the tracks.

Gerry Andrews, who has a coffee kiosk at the station, told Dublin Gazette: “The girls came in roaring crying. It’s a miracle no one was hurt.”

Mr Andrews said he got a “serious fright” when he heard the speeding train, which was not carrying passengers at the time, screeching to a halt.

He said: “I heard the horns going as it went through the station and I knew something was wrong. It’s not nice to think about what could have happened.

“Hopefully they will learn from it. It’s not complicated: stay off the tracks. Stay behind the yellow lines and you’ll be alright.”

It’s believed that there is CCTV footage of the incident. Cllr O’Leary said a pedestrian underpass at the station was closed some time ago and he’s now calling for it to be reopened.

He said there was no substitute for common sense and reminded people that it is illegal to walk on the tracks, and added: “It must have been awful for the poor driver. He hit the emergency brake. He missed them literally by a whisker, by a foot or two.

Irish Rail were contacted for comment but failed to respond.