An army veteran has been jailed for hanging a severed pig’s head from a mosque and daubing the building with offensive graffiti.

Simon Parkes, 45, of Bishop’s Cleeve near Cheltenham and an accomplice who has not been brought before the court, arrived outside Masjidul Falah mosque in Cheltenham with hoods over their faces.

They tied the pig’s head to the gates of the mosque - a deeply offensive gesture.

Parkes also daubed an insult on the walls in red paint.

Sentencing Parkes to four months in prison for racially aggravated criminal damage and harassment, judge Jamie Tabor QC said: “Freedom of expression is a much-cherished privilege but it carries with it responsibilities, the principal responsibility being to act within the law.”

Gloucester Crown Court heard that Parkes, also a former care home worker, posted a picture of himself on Facebook a few weeks later, in which he appeared masked outside the mosque immediately after the incident. It carried the title: “Revenge of the infidel.”

Prosecuting, Lisa Hennessy said the alarm was raised on November 13 2010 when worshippers at the mosque arrived to find a “totally offensive” pig’s head tied to the gates with shoelaces with the name Allah (Arabic for God) inscribed on it.

The court was told worshippers were horrified by Parkes’ actions.

The prosecution said: “The pig is an animal that is unclean. Whoever did it was trying to get a reaction.”

CCTV footage seized by police shows a hire car, recently loaned to Parkes, arriving at the scene. Police later accessed Parkes’ Facebook page to find the picture of him outside the mosque, posted three weeks after the incident, the court heard.

Parkes, who has previous convictions, the most recent being for battery in 2011, made full admissions to police when he was arrested.

Defending, Stephen Thomas said his client was “outraged” at seeing the poppy burned.

”What he realises now is that his behaviour was beyond freedom of expression. He accepts what he did was a rash, foolish and misguided venture,” Mr Thomas said.

Parkes, wearing a grey suit and dark shirt, pleaded guilty to racially aggravated criminal damage and a harassment charge at an earlier hearing.

The court heard he was assessed for post-traumatic stress disorder while still a serving soldier but was told to “get on with his job”.

Mr Thomas said: “He has flashbacks. He was called to an incident where a bomb was exploded and found two dead bodies, one of a little girl. He was deeply affected by that. He has been a widower since he left the army. He put his life and soul into that job.

”I feel he had some form of post-traumatic stress and probably wasn’t thinking clearly. He has fully admitted his guilt and shown his remorse.”

Sentencing, judge Tabor acknowledged that Parkes has had problems since leaving the armed forces but said: “Not only soldiers but the majority of citizens of this country were offended (by the poppy-burning protests). They did not react the way you did.

”You did this while masked which demonstrates not only pre-meditation but allowed yourself to be photographed at the scene. It demonstrates that you were revelling in what you did. You enjoyed what you did and wanted others to know about it. There can be no other reason why you posted it on Facebook.”

The judge said unemployed Parkes, who told the court he was due to be taken on as a plasterer next week, would serve half of his four-month sentence.

Speaking after the case, Inspector Tim Waterhouse from Gloucestershire police said: “I hope this sentence sends out a clear message that this sort of appalling criminal behaviour will not be tolerated.

”Although this disturbing incident happened nearly two years ago, a painstaking and difficult inquiry has led to today’s sentencing.

”The message is clear that we will not stop in our determination to target criminals and keep people and our communities safe from harm.”

Speaking after the case, Inspector Tim Waterhouse, from Gloucestershire Police, said: “I hope this sentence sends out a clear message that this sort of appalling criminal behaviour will not be tolerated.

”Although this disturbing incident happened nearly two years ago, a painstaking and difficult inquiry has led to today’s sentencing.

”The message is clear that we will not stop in our determination to target criminals and keep people and our communities safe from harm.”