A man caught masturbating on a train to Newcastle told police he had been doing it "on and off for an hour and a half" to "relieve stress", wrote chroniclelive.co.uk.
Jordi Cornelius Yebouet was caught out when a female Network Rail staff member sat next to him on the busy service from London Kings Cross in March this year.
Newcastle Crown Court heard the horrified witness saw him making "slow methodical movements" with his hand in his crotch.
Prosecutor Chris Knox said the woman noticed his "movements becoming more vigorous" and told him: "I hope you're not doing what I think you're doing."
But after saying 'no' and turning away, the 24-year-old appeared to "start again later on".
The court heard that the woman had to get off the train at York but was "upset and worried" for other passengers, including two elderly ladies who were sitting nearby.
When the train arrived at Newcastle Yebouet was spoken to by police, admitting that he had been masturbating "to relieve stress".
Mr Knox told the court: "He said he had been doing this for an hour and a half, off and on, but said he had never ejaculated."
Yebouet, from Charlton in London, pleaded guilty to outraging public decency.
The court heard he had taken drugs the night before after celebrating a friend's graduation and was "in some kind of stupor".
Mr Knox said when the witness sat next to Yebouet he was wearing shorts and had a sweatshirt covering his crotch.
"She was concerned that he was masturbating so she tried to show him she had a Network Rail jacket and identity card, trying to dissuade him from what he appeared to be doing.
"She noted that the movements became more vigorous and two other women were sitting on the same row."
The court heard that when the woman said, "I hope you're not doing what I think you're doing", he replied, "No, I'm sorry" and then changed position.
Mr Knox said: "She thought he was concealing what he was doing although she couldn't see an erection.
"She had to get off the train but as soon as she left the train at York she contacted the police.
"She describes herself as being angry, not least because she had given him the chance to stop what he was doing."
Tony Cornberg, defending, said: "This was out of character for him, as was the taking of drugs the night before.
"It was not behaviour targeted at anybody, we even hear about him turning away. It all took place under clothing
"He expresses understanding and empathy for the witness's shock and distress."
Judge Robert Spragg sentenced Yebouet, who has no previous convictions, to a 12 month community order, requiring him to carry out 15 days rehabilitation activity and 80 hours of unpaid work.
The judge said: "You are clearly very ashamed of your behaviour.
"You are a highly qualified, hardworking person. I have no doubt that this was totally out of character."