A 17-year-old heroin addict who spat at a care worker has been jailed for four months by High Bailiff Michael Moyle.
George Langton, of Peel Road in Kirk Michael, admitted assault, possessing heroin and provoking behaviour.
The prosecution said Langton was taken to a care home in Douglas in August but refused to stay.
He was later arrested in the town and was found to have a syringe with the drug in it.
Langton subsequently appeared in court and was taken down to the secure unit.
He refused to be searched, spat at the care worker and shouted abuse, and was arrested again.
His advocate said Langton was very vulnerable, hadn't had the best upbringing and had been battling heroin addiction for a long time.
He said Langton did accept his behaviour was out of order.
Mr Moyle said he appreciated Langton's problems as outlined in a social inquiry report, but had no option but to send him to prison.

Researching your Manx family history can be a very interesting and rewarding hobby. Trace your roots in the Isle of Man with our helpful of guide.