NSW Director of Public Prosecutions Sally Dowling SC won an appeal in the state's top criminal court on Friday to have District Court Judge Penelope Wass removed from overseeing three cases.
The judge had previously refused to step aside.
The cases will now be heard by a judge other than Judge Wass.
The appeal win is the latest instalment in an ongoing feud between the two high-powered legal minds that started with a leak to talkback radio station 2GB.
A media staffer in Ms Dowling's office leaked details about a young Indigenous offender wanting to perform an acknowledgment of Country in court before he was sentenced by Judge Wass.
The leak included restricted material such as the young offender's name and led to a scathing 2024 broadcast about the judge.
In a submission to a NSW upper-house inquiry in 2025, the judge called for Ms Dowling's potential removal from her post and accused the prosecutor's office of leaking the material to damage her reputation.
Making such a submission was remarkable, the appeal court said.
"The judge has a long-standing grievance, or series of grievances, against the director," the NSW Court of Criminal Appeal judges said on Friday.
"The making of a submission by a sitting judge to a parliamentary committee ... inviting consideration of the removal of a senior state office-holder who regularly brings proceedings in the judge's court, is remarkable."
Ms Dowling's media adviser gave evidence to the parliamentary inquiry that the judge was not personally targeted and the decision to approach the radio station was purely to raise the issue that an acknowledgment to Country had been allowed.
In deciding Judge Wass should recuse herself from the three cases, the appeal judges said the matters were a "very clear case for disqualification".
Judge Wass's submissions to the inquiry, as well as her conversations outside court with lawyers in a case before her, invited sufficient doubt for her to be removed, the appeal court ruled.
"Each, considered alone, warrant disqualification," the judges wrote.
"When all are considered together, the case is very clear."
The appeal court found a lay observer might have reason to believe Judge Wass could not act impartially in the cases brought by Ms Dowling and therefore it was in the interests of justice for her to be removed.