William Patterson’s despicable antics on a late night ScotRail service to Port Glasgow were branded ‘unacceptable’ by a sheriff as he placed him on the sex offenders register.

The move came after 57-year-old Patterson’s lawyer argued for him to be spared inclusion on the list.

Solicitor Charles Drummond told Greenock Sheriff Court: “The decision will have a huge impact on his employment status.” The Telegraph told previously how excise worker Patterson — who was caught after CCTV footage showed him with his private parts on display — insisted at a trial: “It wisnae me.” However, a sentencing hearing was told that the pervert now accepts his guilt and has admitted that he was ‘likely motivated by self gratification’.

Lawyer Mr Drummond said his client’s behaviour was ‘disgraceful and worthy of sanction’.

But he added: “He did not attempt to make contact with the witness or engage in conversation.

“He exited the train at the same stop as her and simply went home, and this is worthy of some consideration.” Mr Drummond said that the sex register is to ‘protect the public from a perceived danger’, adding: “This matter should be assessed in that light.” He told Sheriff Ian Fleming that Patterson had turned to drink after his mother passed away and was intoxicated at the time of his offending.

Mr Drummond said: “He is currently suspended from his work pending the outcome of this case.” The door to shamed Patterson possibly being spared inclusion on the register was left ajar after the Crown didn’t pursue him under sexual offences legislation.

Patterson was prosecuted for a common law breach of the peace with a sexual aggravation — which does not automatically lead to inclusion on the list.

Prosecutor Kevin Doherty said: “It would be my motion for the court to find that there was a significant sexual aspect here, given the location of the offence.

“There is also clear evidence that there was a specific complainer who is a young female.” Patterson committed the offence on 5 November last year as he travelled home from Glasgow — where he works for Her Majesty’s Revenue and Customs.

His victim told the court how she saw him in the reflection from the carriage window.

Patterson exited the train’s toilet before taking a seat diagonally opposite to where the young woman was sitting.

She said that she had heard a belt buckle ‘click’ and assumed Patterson was ‘still doing himself up’ after using the toilet.

She then became aware of him looking directly at her and saw him performing the lewd act.

Patterson later unzipped his trousers as he approached the doors to get off the train at his Port Glasgow stop.

He stood close to a woman who was seated with her back to him and proceeded to once again perform a sex act before he alighted from the train.

The court heard that Patterson’s victim was ‘placed in quite a state of fear and alarm’ Sheriff Fleming told him: “I agree with your lawyer who said that this was disgraceful behaviour worthy of sanction.

“I appreciate that as a direct consequence of you losing your mother that you sought solace in alcohol.

“However, your behaviour was unacceptable.

“I am of the view that there was a significant sexual aspect here and that you should be subject to the requirements of the sex offenders register.” Patterson, of Robert Street in Port Glasgow, was also fined £500.