A federal appeals court has kept in place an agreement for President Trump to pay millions of dollars in settlements for the failed Trump University.

The San Francisco-based three-judge panel said in a 21-page ruling Tuesday that one student’s wish to back out of the $25 million settlement deal before it was finalized was not proper.

Sherri Simpson was among those who claimed university officials committed fraud by failing to teach them about real estate-selling techniques. Simpson wanted to pursue her own lawsuit, instead of the class-action settlement.

But the judges said pursuing a separate tort at this stage would be too disruptive for the lengthy, complex litigation that is about to be finalized.

JUDGE WHO TRUMP CRITICIZED TO HEAR CASE INVOLVING BORDER WALL

The issue dogged then-candidate Trump during his 2016 presidential run.

Tuesday’s ruling is a legal vindication for federal Judge Gonzalo Curiel, who had presided over the cases. Trump had labeled the judge a “hater,” hinting the Indiana-born Curiel’s Mexican heritage made him biased against the candidate, because of Trump’s comments on illegal immigration and border security.

In a separate case, Curiel will preside Friday in a key public hearing over lawsuits by California and environmental groups against the administration’s efforts to circumvent environmental laws, in order to fast-track construction of the border wall along Mexico.