A thug abducted two police officers in his Fife flat before threatening to stab them.
Adilson Hernandez admitted locking the two constables in the property and then hiding the key during the terrifying incident on September 28.
The 20-year-old menacingly picked up a shard of broken mirror before putting it down on a unit.
The Cuban national then grabbed a broken television aerial and brandished it at the two officers, who had to struggle violently with the brute to bring him under control.
The court heard how Hernandez had previously abused the emergency services during a separate incident, dishing out swear word-laden abuse and calling them “monkeys”.
At Kirkcaldy Sheriff Court, depute fiscal Azrah Yousaf said: “Police officers attended at the locus to trace a suspect on an unrelated matter. The accused was lying on a bed within the bedroom of the property.
“When the other suspect was told they were being arrested, the accused walked out the bedroom and locked the front door to the premises.
“He ignored the police officers requests to unlock it and went into another room where he hid the key.
“The accused was then seen to pick up a shard of broken mirror before placing it on a table.”
She told Sheriff James Williamson Hernandez then picked up a broken TV aerial and brandished it at the two PCs. He later warned: ‘I’m going to stab you’.”
Defence solicitor David Bell told the court his client had locked the door so a female in the flat would not be taken away by the officers.
He added that his clients threat to stab the constables took place when he was not in possession of any weapons.
Sheriff Williamson refused Hernandez bail and deferred sentence for reports including a restriction of liberty assessment.
The brute, a prisoner at HMYOI Polmont, will reappear for sentencing on July 2.