A heart-broken boyfriend resorted to revenge porn after his former lover spurned his repeated advances to get her back.

Gary Harrington-Walsh posted a video on the online Pornhub site of the couple making love - which was viewed by more than 1,000 strangers - and sent naked pictures of the woman to the school where she was teaching in the Middle East.

A court heard that he had previously threatened to kill himself if his victim refused to talk to him and he claimed on Facebook she owed him rent.

When she ignored him he warned he would put pictures and videos of them having sex online and send them to her employers.

After finding out she had moved to the Middle East, where sex outside of marriage and pornographic images are illegal, he carried out the threat.

31-year-old Harrington-Walsh, of North Parade, Hoylake, pleaded guilty to sending a malicious communication, harassment and three oftences of revenge porn.

Sentencing him to eight months' imprisonment suspended for two years Judge Anil Murray told him, ”It's clear that you took the end of the relationship very badly and then later you behaved very badly.

"You said when you uploaded the images you didn't mean to hurt her. I cannot accept that and you don't stand by that."

The judge told him that he caused his victim "serious harm" and said that it was clearly a case “where you intended to maximise distress and humiliation."

But he said he believed there was a prospect of rehabilitation and sending him immediately to prison would adversely affect his sick mother who relies on him for support.

He ordered him to carry out a ten-day rehabilitation course, 150 hours of unpaid work and imposed a restraining order for ten years.

Christopher Taylor, prosecuting, told Liverpool Crown Court the couple split up in 2016.

His behaviour was "one of the triggers" for her deciding to move abroad in August that year.

She changed her phone number due to calls from withheld numbers and blocked him on social media, though he used ten Facebook profiles to contact her.

After his threats of self-harm she began speaking to him again but later stopped and he threatened to “send every nude and rude picture and video to your school. That will make all your male pupils happy."

Later he warned: ”I will put your sex tapes on the internet and send to your school."

She ignored further messages saying he loved her and wanting to meet over Christmas.When she returned to her teaching job in January she was questioned by her headteacher about three sexually explicit pictures, which had been sent in an anonymous email.

The victim, who described herself as “mortified and embarrassed and initially shaking" contacted Merseyside police.

Harrington-Walsh had also referred to Pornhub which led to her searching the website and found a picture of her, tagged "teacher", which had been uploaded six days earlier. Further checks led to her discovering more photos and the “sex tape”.

Mr Taylor said the video, which had been made by him with her consent, "had been up there for about five months and had over a thousand views."

In an impact statement the victim said: "I felt beyond violated. His actions put me in an extremely vulnerable position…Having your body and personal space exposed publicly against your wishes, without your knowledge or consent, is a violation I will now have to carry with me for the rest of my life.

"It continues to cause me emotional distress and I feel beyond humiliated. I now have a deep distrust of others and cannot imagine trusting someone again."

After his arrest the defendant confessed, claiming he was depressed and drunk when he uploaded the revenge porn.

He said he wanted her attention and did not mean to hurt her. He apologised and told officers he would not contact her again.

John Weate, defending, said his the defendant, who has no previous convictions, had "false hope the relationship was still capable of being reconciled" and had not "coped at all" with the break-up. He had began abusing alcohol after the break-up, became depressed and anxious and had twice tried to kill himself.