"*** you. *** the police," the defendant shouted as he was being restrained.
His supporters urged him not to resist as court security also entered the dock to lend a hand.
Judge Flatley adjourned the session and was led away by court staff.
The defendant yelled at the assorted officers that he was in pain.
"If you don't stop resisting, you'll experience more pain," he was told.
Eventually, he left the court and was heading to the cells when there was a loud bang.
"There was a minor scuffle and a Corrections officer was injured during the restraint procedure," a police spokeswoman said, adding the Corrections officer suffered a "moderate" injury.
The defendant, whom the Otago Daily Times has chosen not to name in the interest of fair-trial rights, was before the court on a charge of injuring with intent to injure.
"Police will be reviewing the matter but at this stage no [further] charges have been laid," the spokeswoman said.
Otago Corrections Facility director Lyndal Miles confirmed the female staff member was injured in yesterday's tussle and taken to hospital where she received treatment.
She would not comment on the extent of the injuries. In 2015-16, Corrections staff were the victims of 17 serious assaults by prisoners.
In that same period, there were nearly 500 non-serious assaults on officers, the most in at least five years.
The defendant at the centre of yesterday's incident is due to appear before the court again later this month.