Startling video footage shows two school students running in front of a speeding freight train at Bellambi.
The pair rush across the level crossing at the station, in footage released by Transport for NSW.
The government body said the level crossings at Bellambi and Woonona were among the worst in the state for near misses as pedestrians dart across the tracks after the gates close.
The video also shows two schoolgirls caught appearing to place items on the tracks ahead of the train.
A short while later, the boom gates at the crossing come down before a teen runs across the track.
A rail worker points out that the gates have closed and the boy hesitates and considers walking back across the tracks again.
Seconds later another boy who couldn’t wait, races across the tracks shortly before a large freight train comes into view.
Transport Minister Andrew Constance blasted people who chose to play “chicken” with trains at level crossings.
“People need to understand, if they do this it’s like playing Russian roulette with 400 tonnes of steel,” Mr Constance said.
“This is silly behavior and it only takes one slip or a stumble you could be seriously injured or worse.”
There were more than 160 near misses last year, through people ignoring stop signs, walking around safety barriers, or running in front of oncoming trains, said Sydney Trains Chief Executive Howard Collins.
He said the Police Transport Command issued 68 on-the-spot fines last year for various offences at level crossings.