A man who told his Muslim-convert stepfather to “eat bacon” has admitted to racism in court.

Dean McAndrew appeared in Forfar Sheriff Court in Scotland after sending a Facebook message to stepfather Christopher McAndrew which read “Go and eat some bacon”.

Christopher McAndrew is in the process of converting to Islam and has filed paperwork to change his name.

Local newspaper The Courier reports that he admitted using a public communications network to send “grossly offensive or indecent, obscene or menacing messages with racially and religiously offensive content” last month, and threatened Mr McAndrew with violence.

Depute fiscal Jill Drummond said: “Mr McAndrew is in the process of converting his religion to Islam. He has completed paperwork to change his name.

“The accused does not use Facebook but uses Messenger as a means of communicating with his family.

“In recent weeks the accused has had difficulties… and witness McAndrew was giving him advice on Monday December 5.

“At 6.49pm on December 6 he messaged witness McAndrew ‘go and eat some bacon’.”

Ms Drummond also said Dean McAndrew described the man as “black”.

Sheriff Gregor Murray, who was presiding over the court, told him: “I hear you’re a first offender but that does not stop me from thinking this is serious, from the charge and what I’ve just heard.”

Pigs and their meat are considered “haram” – or forbidden – in Islam, with some schools now refusing to serve pork in accordance with Islamic law.

In November, two Polish migrants were jailed for a “racially motivated attack” after throwing bacon at a mosque in London.

Pior Czak-Zukowski and Mateusz Pawlikowski, Polish nationals, were both given eight-month sentences for the incident in which they interrupted worshippers at evening prayer.

Detective Constable Tracey McMath said: “The defendants showed a complete disregard for the faith and belief of others in this callous and highly offensive incident.

“I hope their convictions highlight that we will not tolerate hate crime in any of its forms.

“I know this incident had a significant impact on the community and commend the victims for speaking up.”