Two teenagers have pleaded guilty to a "reckless" train surfing stunt that was filmed and uploaded onto YouTube.
Police have slammed the "stupid" actions of the youngsters after they filmed themselves climbing between carriages as the train travelled at high speed.
At one they point they can be seen leaning above the train putting them dangerously close to the overhead power lines, which carry 25,000 volts of electricity.
Harris Ahmed, 18, of The Warren, Manor Park and a 16-year-old boy, who cannot be named for legal reasons, pleaded guilty to endangering the safety of a person conveyed on the railway at Highbury Corner Magistrates' Court on Monday.
Inspector Steve Webster, from British Transport Police, said: “These pranksters risked their lives in making this reckless YouTube video.
“It isn’t impressive, it is stupid. I am stunned that people still think that so-called train surfing is a clever idea, when every day our force sees tragedy on the railway.
“The last thing we ever want to do is visit a family to inform them their loved one has been killed by dangerously climbing on top of a train or otherwise trespassing on the railway.
"The railway is a dangerous environment and can be fatal... a disaster was very narrowly avoided during this stunt.”
The incident was first reported to BTP on Tuesday, October 31 this year, when officers were made aware of the YouTube footage which showed the two boys climbing on a TfL Rail service in Essex.
Ahmed was handed a 12-month community order and ordered to pay £105 victim surcharge. The 16-year-old was handed a four-month referral order and ordered to pay a £105 victim surcharge.