A TEENAGER barricaded himself in his room and played loud music after staff said he had to leave James Bank Hostel.

James Hagerty was told by staff he was being evicted from the homeless accommodation in Dunfermline after drinking excessively.

The 18-year-old, of no fixed abode, then held a knife to his throat and demanded to speak to social workers.

Appearing at Dunfermline Sheriff Court, Hagerty previously admitted that on September 25 at James Street, he behaved in a threatening or abusive manner likely to cause fear or alarm by smashing a bottle, barricading himself within his room, refusing to leave when asked to do so and making threats to self-harm if removed from the property.

Hagerty had been consuming a large amount of alcohol and continued to drink into the early hours of the next day.

"He fell asleep and when he woke he was told he was being evicted," depute fiscal Dev Kapadia said.

"He then barricaded himself in his room while playing loud music and avoiding staff.

"Police were told that he had locked himself in and was making threats to harm himself and when they arrived they found debris outside of his window.

"He was agitated, shirtless and holding a knife to his throat, saying he had done nothing to warrant eviction.

"He also demanded to speak to social work."

Eventually Hagerty's protest stopped and after jumping down from the window, he was apprehended.

Defence solicitor David Bell said: "When I met Mr Hagerty he appeared to be very distressed with signs of self-harming.

"He has been dealing with this by means of alcohol and other substances.

"His problem was that he did not know where he was going to go and unfortunately this has been a pattern of behaviour since he left fostering.

"He has had a very troubled childhood and wants to continue to work with the social work department in the community."

Sheriff Craig McSherry deferred sentence until January 17 and placed him on a restriction of liberty order for eight months.