A youth caught wandering about the streets with a knife has been told he must clean up his act.
Ricky Swales spent more than six months in custody after his arrest in Gowkthrapple.
He was placed under supervision for 18 months at Hamilton Sheriff Court this week.
Swales, 19, of Glasgow, admitted unlawful possession of a sword and breaching bail orders by entering Wishaw and being outside his home address at night.
He also admitted threatening or abusive behaviour at Motherwell police station.
Swales was the subject of seven bail orders at the time.
The court heard he is from the Wishaw area, but bail conditions were supposed to keep him away from the town.
Alice Carey, prosecuting, said the accused's mum spotted him in Birkshaw Brae around 10.15pm on September 4.
He was carrying what she thought was a knife so she contacted the police.
Ms Carey told the court: "The accused was seen on CCTV walking freely around Birkshaw Brae with what appeared to be a sword in his possession.
"He was seen entering a common close. Police officers attended and instructed him to drop the weapon. He was taken to the ground and handcuffed.
"Swales told them 'C...s owe me money'. He was searched but nothing further was recovered.
"At the police station he was abusive and threatened to bite the nose off one officer."
Sheriff Thomas Millar said he was prepared to impose a supervision order as an alternative to custody.
He warned Swales: "If you are in any more trouble after your release you stand to be returned to custody."
Don't miss the latest headlines from around Lanarkshire. Sign up to our newsletters here.
And did you know Lanarkshire Live is on Facebook? Head on over and give us a like and share!