An Invercargill man started off abusing pedestrians in Queenstown on Thursday night.
He ended it defecating in a Queenstown police station cell, and smearing his faeces "through the cell and out under the door".
In the Queenstown District Court yesterday, Judge Bernadette Farnan told Riki Matanga McCormack, 38, his actions were "disgusting".
"I hope you've apologised.
"Imagine if someone came into your home and did that? You would want to vomit."
Prosecuting sergeant John Somerfield, of Dunedin, said police were called to Gorge Rd about 6.45pm after reports McCormack and an associate, both of whom had been drinking, were yelling at and abusing pedestrians. McCormack was "highly agitated".
When police arrived he continued to hurl abuse and then "stormed" towards the patrol car.
Police attempted to find out why he was so agitated, but he refused to talk to them, instead continuing to shout and swear.
When he tried to confront a member of the public he was arrested, but his behaviour escalated at the Queenstown police station. He later had no explanation.
Judge Farnan sentenced him to 40 hours' community work and ordered him to pay $59.80, the cost of the commercial cleaning for the cell he used as a bathroom.