LOS ANGELES (AP) - Angelina Jolie scored a major victory Friday in her divorce with Brad Pitt when a California appeals court agreed with her that the private judge deciding who gets custody of their children should be disqualified.

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.

The decision means that the custody fight over the couple's five minor children, which was nearing an end, could just be getting started.

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.

“The appeals court ruling was based on a technical procedural issue. 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,” a statement by Pitt's representative said. “We will continue to do what's necessary legally based on the detailed findings of what's best for the children.”

Details of the custody rulings have not been publicly released.

Jolie and Pitt have six children: 19-year-old Maddox, 17-year-old Pax, 16-year-old Zahara, 15 year-old Shiloh, 12-year-old Vivienne and 12-year-old Knox. Only the five minors are subject to custody decisions.

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.

The July 9 oral arguments in front of the appeals court focused on exactly which ethical rules should apply to private judges, who, like Ouderkirk, are usually retired superior court judges.

“If you're going to play the role of a paid private judge you have to play by the rules and the rules are very clear, they require full transparency,” Jolie's attorney Robert Olson said. “Matters that should have been disclosed were not disclosed.”

Pitt attorney Theodore Boutrous said the attempt at disqualification was a stalling tactic by Jolie to keep Ouderkirk's recent tentative custody decision, which is favorable to Pitt, from going into effect.

The court cited several cases, including the divorce of “Modern Family” co-creator Steven Levitan, in which Ouderkirk either failed entirely to disclose a business relationship with Pitt's attorneys or failed to disclose one quickly or completely enough.

The panel questioned whether such an arrangement should be allowed in California at all, but their ruling applies only to Ouderkirk.

Jolie, 46, and Pitt, 57, were among Hollywood's most prominent couples for 12 years. Ouderkirk officiated the couple's 2014 wedding, then was hired to oversee their divorce when Jolie filed to dissolve the marriage 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.

In May, Jolie and her attorneys criticized Ouderkirk for not allowing the couple's children to testify in the proceedings.

The actress also said the judge “has failed to adequately consider” a section of the California courts code, which says it is detrimental to the best interest of the child if custody is awarded to a person with a history of domestic violence. Her filing did not give details about what it was referring to, but her lawyers submitted a document under seal in March that purportedly offers additional information.

The ruling does not address whether the children should be allowed to testify in the case.