An East Kilbride man landed in trouble after a female friend he was supposed to stay away from turned up at his home for a drink and drugs session.
When he was arrested for breaching his bail conditions, Andrew Watt hurled abuse and threats at police officers.
Watt, 35, of Talisman Place, appeared from custody at Hamilton Sheriff Court this week.
Download the Lanarkshire Live app today
The Lanarkshire Live app is available to download now.
Get all the news from your area – as well as features, entertainment, sport and the latest on Lanarkshire’s recovery from the coronavirus pandemic – straight to your fingertips, 24/7.
The free download features the latest breaking news and exclusive stories, and allows you to customise your page to the sections that matter most to you.
He admitted breaching bail conditions imposed earlier this month by having contact with the woman.
Watt also admitted threatening or abusive behaviour towards police officers.
They had gone to his home in the early hours of Tuesday after a complaint about loud music.
The female friend was there with him and Watt was arrested.
Rebecca Clark, prosecuting, told the court: “There is no suggestion of any animosity between them.
“The woman advised the police that she had come over of her own accord as she missed him. They had spent the time drinking.
“While in the police van, the accused became aggressive towards the police, shouting comments such as ‘scumbags’ and ‘yous are getting it’.”
Defence agent Andy Thomson said Watt, a self-employed bricklayer, is “doing his level best to lead a normal, law-abiding life”.
But he added: “There is a cocaine problem and he keeps getting himself into trouble.
“On this occasion he was very angry at being arrested.
“The woman had turned up at his home with alcohol and drugs.
“He doesn’t remember much about what he said to the police, but his language was unacceptable.”
Mr Thomson suggested Watt could be placed under social work supervision as “he genuinely needs help”.
Sheriff Liam Murphy called for a criminal justice social work report and deferred sentence until later this month.
Watt was released on bail.
*Don’t miss the latest headlines from around Lanarkshire. Sign up to our newsletters here.