Douglas Cruikshank, 39, and 18-year-old Chelsea Lambie threw bacon at the window of Edinburgh’s Central Mosque and wrapped the meat around door handles on January 31 last year.
Edinburgh Sheriff Court heard they and a third offender were associated with the Scottish Defence League, prosecutors said.
Wayne Stilwel, 25, from Gorebridge, Midlothian, previously admitted his involvement and was sentenced to 10 months in September.
Cruikshank, from Galashiels in the Borders, and Lambie, from Paisley, Renfrewshire, were convicted of threatening and abusive behaviour following a trial.
The trial heard that a man who was inside the mosque praying on the morning of the attack heard something hitting the prayer room window. Slices of uncooked bacon were later discovered stuck to the window. Islam prohibits the consumption of pork.
When Lambie was arrested at her boyfriend’s home in Gorebridge on January 31, a Blackberry mobile phone was found in her clothing. Messages sent on January 31 included: “Going to invade a mosque, because we can go where we want”. A message to the phone asked: “What you do last night?” and the reply: “Went to the mosque in Edinburgh and wrapped bacon round the door handles, opened the door and threw it in ha ha ha”. Google searches on the phone were for the location of the mosque, addresses for taxis in Gorebridge and Dalkeith and at 14.59 on January 31: “Edinburgh mosque bacon search”.
In her evidence, Lambie, who had admitted during a police interview to being a member of the Scottish Defence League, denied taking any part in the raid on the mosque. She said she had been in her boyfriend’s house in Gorebridge all the time. As to the picture taken at the mosque and the messages, she told the court there were other people in the house and she left the phone on the living room table. “I let everyone in the house use it. It’s a contract phone, free for everything” she said and added she did not know who had sent the messages.
John Logue, procurator fiscal for the east of Scotland, said: “The Muslim community are a valued and integral part of Scottish society and there is no place for such attacks in modern Scotland.
“As we strive to become a fairer and more tolerant society to live in we will not let it be blighted by a narrow minded and hateful minority.
“Prejudice and bigotry have a corrosive effect on our nation and we will maintain our zero-tolerance approach towards such crimes which will continue to be investigated carefully and prosecuted robustly.”
Cruikshank was sentenced to nine months’ imprisonment and Lambie was ordered to spend 12 months in a Young Offender Institution, the Crown Office said.