A teenager was given the chance to “get back on the straight and narrow” rather than going to jail after admitting drunken disturbances in Inverness and Invergordon.
Campbell Brett, of Fingal Road, Dingwall, appeared for sentence on several charges after a background report had been prepared.
The 18-year-old pleaded guilty to brandishing a knife and threatening to harm himself on March 28 in Montague Row.
Police had been called there to deal with Brett who locked himself in his room after refusing to hand over the weapon.
Officers with riot gear eventually had to be called.
He was taken to Raigmore Hospital as there were fears he had swallowed bleach and while there he spat on a police officer and made a racial comment to a hospital employee.
Inverness Sheriff Court then heard that on June 7, Brett was injured in a fight in Invergordon and refused treatment.
He was taken back to his room where he briefly barricaded himself in.
He was arrested and taken to hospital where he made a sexual remark to an ambulance technician.
Defence solicitor Neil Wilson told Sheriff Chris Dickson: “He needs a helping hand to get back on the straight and narrow.”
The first offender was ordered to carry out 120 hours of unpaid work, placed on social work supervision and has to receive substance abuse treatment.