A 20-year-old man brandished a knife at customers in a Kirkcaldy chip shop and later attacked police at the Victoria Hospital.
Derry McGarrell, of Braid Court, St Monans, appeared at Dunfermline Sheriff Court where he admitted a series of offences which took place on June 23.
At Valentinos, Dunearn Drive, Kirkcaldy and elsewhere, he repeatedly uttered offensive remarks, shouted, repeatedly brandished a knife at members of the public, threatened to cut himself with the knife and made threats of violence.
He also admitted being in possession of a knife in Dunearn Drive.
The same day at the Victoria Hospital’s accident and emergency department he assaulted PC Alan Smith by attempting to headbutt him and then kicked him on the head and compressed the officer’s neck between his legs.
He also assaulted PC Craig Aitken by attempting to bite him on the head and body.
He further admitted also at the A&E, he repeatedly shouted and swore, repeatedly made offensive and homophobic remarks and repeatedly uttered threats of violence towards police officers.
The court heard McGarrell was already on a community payback order.
Sheriff David Mackie called for reports and McGarrell will be sentenced on April 24.