A California appeals court on Friday disqualified a private judge being used by Angelina Jolie and Brad Pitt in their divorce case, handing Jolie a major victory.

The 2nd District Court of Appeal agreed with Jolie that Judge John W. Ouderkirk didn’t sufficiently disclose business relationships with Pitt’s attorneys.

“Judge Ouderkirk’s ethical breach, considered together with the information disclosed concerning his recent professional relationships with Pitt’s counsel, might cause an objective person, aware of all the facts, reasonably to entertain a doubt as to the judge’s ability to be impartial. Disqualification is required,” the court ruled.

RELATED: Spencer Pratt Credits Angelina Jolie & Brad Pitt For Making Him ‘Over A Million’ Dollars

The decision means that the custody fight over the couple’s five minor children, which was nearing an end, could be starting over.

The judge already ruled the pair divorced, but separated the child custody issues.

Like many celebrity couples, Pitt and Jolie opted to hire their own judge to increase their privacy in the divorce proceedings.

RELATED: Brad Pitt’s Lawyer Fires Back At Angelina Jolie Amid Custody Appeal

Ouderkirk declined to disqualify himself when Jolie asked him to in a filing in August. A lower court judge ruled that Jolie’s request for disqualification came too late. Jolie’s attorneys then appealed.

Attorneys for the two sides did not have an immediate comment on the ruling.

Pitt’s rep gave the following statement after the ruling: “The appeals court ruling was based on a technical procedural issue, but the facts haven’t changed. There is an extraordinary amount of factual evidence which led the judge — and the many experts who testified — to reach their clear conclusion about what is in the children’s best interests. We will continue to do what’s necessary legally based on those detailed findings of what’s best for the children.”

Jolie, 46, and Pitt, 57, were among Hollywood’s most prominent couples for 12 years. They had been married for two years when Jolie filed for divorce in 2016. They were declared divorced in April 2019, after their lawyers asked for a judgment that allowed a married couple to be declared single while other issues remained, including finances and child custody.