A Dunedin judge accused of bias and excessively intervening during a trial has been cleared by the Court of Appeal.
Judge Kevin Phillips found Michael James Stark (then 48) guilty of injuring with intent to injure and assault with a weapon following a judge-alone trial in the district court last year.
While Justices Duffy, Harrison and Williams said ''some of the judge's language may be criticised'', Judge Phillips' conduct during the hearing did not amount to a miscarriage of justice.
Stark claimed the judge had ''intervened excessively and essentially took over the running of the prosecution case'', ''displayed bias'' and ''did not maintain an appearance of impartiality or an open mind''.
It was not the first time the defendant has aired his grievances about a judicial officer. Before the 2016 trial, he had threatened to kill an unnamed district court judge.
While behind bars, Stark told a Corrections officer and a doctor he knew where the judge lived and would ''get a gun and kill him''.
The threat, along with the violence charges against his partner and other convictions, saw him jailed for three years two months.
Stark had been living with the woman - a prostitute - for eight months.
On the night of the offending she was working from the home they shared and shortly after a client left, the defendant attacked her. She required hospital treatment and the next day gave a full statement to the police identifying Stark as the one who inflicted her injuries.
The victim told police he punched her in the head, stomach and other areas of her body and hit her with a baseball bat.
Despite her statement to police the woman recanted at trial and told Judge Phillips her assailant had actually been a Road Knights gang member called ''Dan''.
She was declared a hostile witness and Stark claimed Judge Phillips helped run the prosecution case.
But Justice Duffy noted the police prosecutor was inexperienced and in the absence of a jury, the judge was the primary ''fact finder'' and was permitted to intervene.
Warnings he gave to both the victim and Stark about potentially being convicted of perjury were sensible and warranted in the circumstances, she said.
''We do not see this conduct as indicating or suggesting the Judge was biased,'' Justice Duffy said.
The Court of Appeal saw the evidence against Stark as ''overwhelming'' and accordingly, Stark's appeal was dismissed.