Residents in a Rosyth street had to be moved out of their houses when a man was abducted in his own home, tied up and told he was going to be killed.
Knife-wielding attacker John Jones said he was going to murder Michael Anderson and when police surrounded the house he warned them he had explosives and a gun.
Dunfermline Sheriff Court heard Jones, 37, was living at the home of his friend Mr Anderson and became upset after a visit by his psychiatric nurse.
Afterwards he started “rambling incoherently” and decided to abduct Mr Anderson to show the authorities how he felt about his treatment.
Jones, a prisoner at HMP Perth, admitted that on April 10 at a house on Backmarch Road, Rosyth, he abducted Michael Anderson, prevented him from leaving, detained him against his will and assaulted him by tying his hands behind his back.
He also admitted he behaved in a threatening or abusive manner by shouting, swearing, brandishing a knife, threatening to kill Michael Anderson, pushing the blade of a knife through the letter box, claiming he had explosives and that he was in possession of a gun.
Police received a 999 call and attended along with the fire and ambulance services.
Depute fiscal Claire Bremner said when police arrived Jones was shouting and screaming from behind the front door.
She said: “He said he had a hostage and intended to murder him. He said he’d been let down by the authorities and was going to murder his hostage. He said he was in possession of a knife and stuck the blade of a large kitchen knife through the letter box. A cordon was put in place around the house and it escalated into a siege-type scenario.”
A police sergeant starting speaking to Jones by phone and thought he could hear Mr Anderson being assaulted in the background.
Ms Bremner said: “He said to the sergeant that he had rigged the house and had access to petrol and flash bangs.
“He said he had military training and was prepared for any police action taken to get into the property.”
He warned that police would be in for “a surprise” if they tried to get into the building. After continuing to make threats the incident suddenly ended with Jones kissing Mr Anderson, going outside and surrendering to police.
Sheriff Charles Macnair called for reports and Jones was remanded in custody. He will be sentenced on August 26.