Police officer faced months of checks after being pierced by a used hypodermic needle found with Muir of Ord man
Officers were called to a charity shop in Inverness in April last year when a man was found unresponsive in a toilet.
The police and an ambulance were called to the scene in the city's Nelson Street.
Depute fiscal Fiona Murray said by the time services arrived Zen Etchells was responsive, but became irate at their presence.
Officers found freshly used needles on the floor and were concerned he had overdosed on drugs.
Etchells tried to resist and obstruct the police by throwing himself to the ground.
Ms Murray told Sheriff Chris Dickson that police recovered a backpack containing between 20 and 30 used hypodermic needles.
One pierced an officer's skin and he had to be treated at Raigmore Hospital to reduce the risk of him contracting HIV.
The fiscal said this treatment had been ongoing for six months and he had suffered physical side-effects.
So far, however, no blood-borne viruses had been identified but the incident had an impact on the officer's physical and mental health.
Etchells (25) of Vulcan Cottage, Muir of Ord, admitted culpable and reckless conduct in Inverness on April 15 by carrying the back-pack with uncapped needles which were exposed, leading to the injury of the officer.
He also admitted resisting arrest and, separately, on June 25 last year, failing to register a change of address with police under the terms of Sex Offenders Act 2003.
Sentence was deferred until January 23 for the court to obtain an up to date report on the officer's health.