A Perth prison officer who posted religious hatred on social media dodged his own spell behind bars after a sheriff praised him for his service to his country.
Former military man Daniel Cochrane was instead ordered to carry out 100 hours of community service for his online indiscretion.
It means the 57-year-old, who has been a respected prison officer for many years, still has hopes of saving his career.
Cochrane stunned colleagues in January with an “ill-tempered” Facebook rant in which he angrily attacked people of multiple religions.
He railed against “Muslim terrorist b******s” before being taken to task by others involved in the conversation.
One colleague told him it was “grossly offensive” that he was grouping all members of one religion together and suggested that he visit a mosque to learn the error of his ways.
When he followed up his earlier comment with a similar attack, this time on “Catholic terrorist b******s”, his work mates reacted in horror once again.
He was told: “It is incredibly ironic that you talk about Muslims spreading hate when hate is exactly what you are spreading with posts like this.”
The 57-year-old later removed the posts after calming down and realising they were “ill-tempered and wrong”.
He said he had been “embarrassed and ashamed” and blamed his “angry rant” on feelings that spilled over from hearing of a story in which a Muslim man was shot and killed by police officers on the M62 in West Yorkshire in January.
Colleagues, however, had been appalled by his words and at least one spoke to prison authorities the following morning.
The Scottish Prison Service subsequently contacted the police, who interviewed prison staff and took screenshots of Cochrane’s messages.
Cochrane, of Perth, admitted sending messages of a grossly offensive nature to the social media forum Facebook on January 8 this year, in that he made comments that were religiously motivated.
His solicitor told Perth Sheriff Court: This was a one-off error of judgement.
“Mr Cochrane was going through a difficult time and has expressed genuine remorse over what happened.
“There was no genuine intent to harm anyone with these comments, though he now accepts that they could have caused upset to individuals.”
Sheriff William Wood told Cochrane: “Clearly you are a man who has given a significant amount to his country, both through service in the military and through service as a prison officer.
“You must be aware, however, that those of us who work in public service must be held to the highest standards.
“These comments were at best intemperate and at worst highly offensive.
“A custodial sentence would be justified, but taking into account your service and the fact that you are a first offender, I will look at an alternative.”