Last updated at 21:19 09 December 2007

This is the moment a 21-year-old man diced with death as he played on tracks as a train came hurtling towards him.

Showing off in front of his friends, Andrew Ogden, from Astley Village, Chorley, struck a pose standing right in front of an oncoming train.

The dangerous near-miss was captured on CCTV cameras at Rylands level crossing in Chorley on July 14.

Scroll down for more...

Just before 10pm that night, Ogden and three friends were walking across the level crossing when Ogden stopped and stood with his arms raised in front of the train.

He jumped out of the way at the last possible moment before the Northern Rail 20.48 Manchester Airport to Blackpool service sped past at 50mph.

The driver of the train was unsurprisingly left extremely shaken and had to finish work for the night before being signed off work for a week by his doctor.

Superintendent Peter Holden of British Transport Police said: "This was a shocking case of somebody blatantly showing off to their friends which could so easily have ended in tragedy. He was inches away from being struck by a train travelling at 50mph.

"This sort of incident is plain stupidity and people need to realise that it is viewed by BTP extremely seriously. The driver genuinely thought he had struck the man and was left extremely traumatized.

"I hope that people look at this case and understand that trespassing on the railway is not a game and if you are involved in incidents such as this you will be dealt with by the courts."

Ogden pleaded guilty to obstruction without intent and will be sentenced at Preston Crown Court on 7 January 2008.

Ogden was released on unconditional bail pending sentencing on 7 January.