After barricading himself in the Oamaru District Court cells a 33-year-old man was pepper-sprayed and ordered into custody despite his belief that the judge kidnapped him by doing so, police say.
Senior Constable Ross Lory, of Oamaru, said the altercation happened during a judge-alone trial day at the court on Wednesday.
The man was in the cells and began to bang and kick his cell door.
Lory said the offender eventually kicked the door out, smashing it from its frame, and then barricaded himself behind another door.
One of the duty court police officers said the defendant refused to "see sense" and he was pepper-sprayed.