A woman believed she was going to be raped by a man who exposed himself in an empty train carriage.
Oliver Trim has been jailed after repeatedly asking the victim to have sex with him in the train toilets, before unzipping his trousers and standing over her.
He had been released from prison just hours earlier, and told the victim this after she helped him with his trapped bag.
The victim managed to send a message to friends, prompting police to board the train at the next station and arrest him.
The 32-year-old from Cardiff later assaulted a police officer.
Westminster Magistrates’ Court heard Trim boarded a Bristol-bound train from London Paddington last year.
He was helped by the victim as his bag became trapped when he walked down the aisle.
Trim then sat near the victim and tried to make conversation with her. The court heard he asked her to have sex with him in the toilet and asked whether she was ‘naughty’.
She turned down his request and ignored him, however he repeated his advances and unzipped his trousers.
In a victim impact statement, the woman said: “The incident left me feeling disgusted and in some ways angry, upset and frightened about what happened.
“I didn’t know what to do. If I hadn’t defended myself I believe he would have taken things further. I believed he would rape me. It makes me upset to even think about it.
“I am incredibly anxious to get on board another service to Bristol. I don’t know if I will ever feel comfortable getting on a train alone again."
The court heard Trim then “squeezed the bottom” of a female police officer.
The officer said in a statement: “I’m a firm believer in being treated fairly and being treated how you would want to be treated. This has had a profound impact on me. I felt upset writing this and very teary.
“Now I feel as if I have had my personal body violated. Although there are no physical injuries I now feel as though this will stay with me for a long time to come.”
Trim admitted exposure, sexual assault and criminal damage and was convicted after trial of using racially aggravated insulting language. The latter charge related to him using a racial slur to someone at London Paddington.
District Judge Angus Hamilton said: “Mr Trim seems to be so unmotivated to do anything about his behaviour.
"These offences occurred the day he was released from prison, he appears to lack the self-discipline to keep himself out of trouble for 24 hours.
“His record shows a horrible hostility towards women, that may be made worse when he is drunk. He doesn’t appear to be motivated to do anything about his alcohol abuse.”
Jailing him for 37 weeks, Mr Hamilton said: “I do believe strongly in constructive sentencing - sentencing designed to tackle an underlying problem.
"But there are some cases where that simply isn’t an appropriate form of sentencing and I’m afraid in my view you fall firmly into that category.”
As Trim tried to speak over him, the judge continued: “You appear to have done very little to address underlying issues and according to probation services you failed to engage with them and missed appointments.
“The exposure was a protracted incident where you repeatedly exposed yourself to a woman who appears to have been targeted because she was on her own in a railway carriage.
“Third is the issue of your record which is appalling and shows a repeated disregard in relation to the safety of women and repeated aggressive assaults on women.”
Trim was also ordered to pay a fine of £120 for damaging a police cell.