A man who barricaded himself inside a flat with petrol-covered sofas has admitted sparking a police siege.
Stuart Alexander Graham appeared at Kirkcaldy Sheriff Court and accepted behaving in a threatening and abusive manner during the March 30 incident.
The 26-year-old admitted smashing windows and throwing household items before spraying himself with a liquid which he said was petrol.
Graham then threatened to set himself alight before shouting abuse at police officers and members of the public who stood behind the cordon at the property on Rossend Terrace in Burntisland.
Specialist police resources were called to the scene during the incident, which lasted several hours.
Depute fiscal Sarah Lumsden said: “The locus is owned by Fife Council and leased to the accused’s uncle.
“At around 4pm, the police received a phone call to attend after reports of a male smashing up the property. Officers attended and found the accused there.
“It was noticed that he was extremely agitated and acting in a very aggressive manner. He was seen throwing a number of items out of the property.
“The accused started spraying a liquid from a juice bottle and stated that it was petrol and that he was going to set himself on fire.”
The incident was listed as a siege by attending officers and specialist units were summoned to the scene including public order officers, negotiators and the fire service.
Miss Lumsden said: “The incident lasted several hours and the accused was making a number of threats to police officers and members of the public who were outside the cordon.
“The accused eventually came out of the property of his own accord and was taken into police custody.”
Defence solicitor Martin McGuire told the court his client was struggling to deal with the trauma of losing his father in 2014.
Mr McGuire said Graham had taken a quantity of anticonvulsant medication and was hospitalised for around a week suffering from toxic shock.
Sheriff James Williamson said: “My first instinct was to send you to prison, mainly as a consequence of your appalling record.
“There has been some progress in terms of your offending and that has been supported by the social work department so far but if you are unable to do some hours of unpaid work then prison awaits you.”
Sentence was deferred for reports to be compiled and Graham was ordered to reappear on October 24.