Police used a Taser on an Arbroath sex offender after he threw rocks at them during an early morning rampage.
Steven Dunn also tried to bite officers during the violent episode last summer.
Reports have been ordered, with Dunn locked up ahead of sentencing later this month.
Sex offender threw rock at police
Dundee Sheriff Court was told how police had been called out to Culloden Road in the Angus town just after midnight on June 22 last year.
Dunn, a registered sex offender, was seen running down a close.
However, he returned a short time later, clutching a rock.
“He ran towards the officer shouting ‘I’ll kill you’ prompting the officer to require urgent assistance,” fiscal depute Lee Corr said.
“The accused threw a rock, narrowly missing the officer’s head.”
At around 12.30am, other officers saw Dunn, who then ran towards PC Kieran Ritson with a brick over his head.
Spit hood and nose-bite threats
PC drew his Taser before Dunn threw the brick towards PC Ritson, causing it to strike him on the lower back.
Mr Corr added: “PC Page deployed his taser which contacted with the accused’s leg.
“This resulted in him falling into the road.
“Whilst officers applied a spit hood, the accused attempted to bite PC Ritson’s hand.
“The accused’s behaviour was hostile and was continually shouting, swearing and making threats.”
Dunn, a prisoner at HMP Perth, tried to bite PC Dawn Jamieson while shouting: “I’ll bite your f****** nose off.”
The 47-year-old pled guilty to throwing a rock at PC Wylie, striking PC Ritson with a rock and trying to bite him on the body, trying to bite PC Jamieson and repeatedly shouting, swearing and making threats.
Sheriff Paul Brown deferred sentence on Dunn until later this month in order for reports to be prepared.
For more local court content visit our dedicated page or join us on Facebook.