A 39-YEAR-OLD man subjected police officers to a tirade of homophobic abuse after being arrested following an incident in a Selkirk shop, the town's sheriff court has been told.

Officers were called out to the shop at 10 to 11 in the morning earlier this year to investigate a report of an alleged theft.

They found John Fernon from Motherwell outside the shop in possession of a hammer which he claimed he had found near the premises.

Fernon was arrested but become agitated towards officers and directed the homophobic abuse towards them on several occasions.

Fernon's lawyer said her client had ran away from home at the time and was struggling with his mental health.

He had been looking for a food bank in Selkirk when the inicdent began.

Fernon pleaded guilty to charges of possession of an offensive weapon and threatening or abusive behaviour.

A not guilty plea to a charge of theft was accepted by the Crown.

Sentence was deferred until October 18 for background reports.