Former soldier Simon Parkes stuck a pig's head to the gates of a Cheltenham mosque in an act of revenge.
Wearing a balaclava, the 45-year-old also sprayed an insult aimed at Muslims along Masjidul Falah Mosque in the High Street. He claimed he was angry after seeing extremists burning poppies in London during a Remembrance Sunday service.
Parkes, of Crown Close, Bishop's Cleeve, admitted causing religiously aggravated criminal damage and causing religiously aggravated intentional harassment, alarm or distress when he appeared before Cheltenham magistrates. The crime was committed on November 13, 2010.
Parkes, who had served in Northern Ireland before being demobbed in 1993, suffered from post-traumatic stress disorder, his solicitor Andrew Twomlow said.
CCTV footage showed Parkes park a hired car in Granville Street before walking to the mosque with the pig's head and spray paint.
Sharon Jomaal, prosecuting, said: "He left a severed pig's head with Allah written along the side which was attached the front gate." She said he also wrote a racist slur in red spray paint along the front of the mosque. Parkes later posted a picture of himself at the scene on Facebook.
Magistrates committed the case to Crown Court for August 30. He was released on conditional bail.