CCTV footage of a man narrowly escaping death on a railway line has been released by Network Rail.

The man was cycling on the platform when he jumped onto the tracks and stumbled before falling down, barely missing the live rail at Littlehaven Railway Station in Horsham.

The man then scrambled over the tracks and dived underneath the platform to escape an oncoming train.

The dramatic footage was released as part of Network Rail’s campaign to stop people trespassing on railway lines.

The man was prosecuted in 2011 for malicious intention and was sentenced to four months’ imprisonment, suspended for 12 months. He was ordered to carry out 120 hours of unpaid work.

In the last five years 142 people have lost their lives on the railways, many of them teenagers, and a further 254 have been injured.

And Brighton company Think Again Productions has created a short film about the dangers of being distracted around railways, which will be shown in schools across Sussex.

In this eight-minute film, secondary school pupil Jenni is joking with her friends as they wait for a train, and she grabs another girl’s mobile phone.

As the girl tries to grab her phone back, she falls backwards onto the track – just as the train arrives.

Nicola Dooris, community safety manager for Network Rail, said: “Films like these are a great way to engage school children and really bring home how dangerous the railway can be.

Many schools are located close to the railway track so we believe the behaviour shown in the film is something all children can identify with.

“We hope that everyone who sees this film will be able to put themselves in the character’s shoes and realise that messing around near the track can have very dire consequences.”

Network Rail say they are already receiving an excellent reaction to the film from schoolchildren.