A former Ukip candidate, counter terrorism operative and ex-Royal Marine received a suspended prison sentence after emailing a “grossly offensive” message to a Cambridge mosque and posting anti-Islamic content on his Facebook profile.

Ian Couch targeted the mosque in a drunken rage after the news of James Foley’s execution by ISIS dominated headlines. But the courts looked favourably at Couch’s remorse.

In mitigation it was revealed that Couch struggles with depression and alcoholism. In court, he spoke only to ‘profusely apologise’ for his actions. Couch now must undergo a six month treatment programme to help him address his alcoholism on top of a victim surcharge of £80 and £420 towards prosecution fees.

Couch stood for UKIP in the Shelfords and Stapleford Ward district council elections and gained 388 votes last year. But Conservative candidate Joseph Shelton was elected with 1143 votes.

Prior to the trial’s conclusion, the judiciary in the Couch case dismissed his claim that the email to the mosque was merely “freedom of expression”.

Lead magistrate Marisa Johnson also criticised Couch for hiding his bigotry behind a free speech defence against the “indefensible”.

We find the email was offensive – we are offended by it and it had the intention of causing offence and distress to the people who received it,” she said.

Abdul Muquith, a taxi driver, who volunteers at the mosque discovered the email, and told the court of his disgust at reading the contents of the email. Couch’s Facebook page had little in the way of privacy settings, so many of his wall posts remain publicly accessible, Muquith’s disgust increased after discovering some of the content on Couch’s Facebook.

Indeed, some examples include the sharing an image that depicts Muslims (by extension Arabs) in racist caricatures fleeing depictions of the Prophet Muhammad held up by cartoon pigs, Couch compliments the image with the statement ‘Fecking Musies’. Nor was Couch adverse to sharing memes relating to bacon.

The court heard other anti-Muslim statements including ‘your religion is a disgrace’ and ‘the sooner we destroy Islam the better’. Couch also shared a meme that described the Qur’an as a declaration of war.

The photo of the pig’s head accompanied the text ‘Something for the beheading; hate preaching Muslims to think about over Friday morning prayers. The Police will probably be the 1st to retrieve the pigs head. Isn’t it funny that they can cut off women and childrens heads but can’t touch a pigs? Muslim w*nk raping stains’.

Couch’s rant went further ‘Feck the murdering Musies. Have some of your reality. You preach, we tollirate and you hide behind a British Passport that we gave you…’

Many felt a justified rage when the terrorist group ISIS murdered western journalists so publicly but many did not react like Couch, targeting ordinary Muslims in Britain with hate messages.

UKIP asked Couch to leave the party after his anti-Islam views were exposed, a move he agreed with, according to Paul Bullen, UKIP group leader for Cambridge County Council.