President-elect Donald Trump will shell out $25 million to settle lawsuits against his now-shuttered Trump University two days before he is sworn in as the country’s 45th president.

According to settlement papers filed late Monday in federal court in San Diego, Trump’s lawyers say the mogul will personally guarantee the payment by Jan. 18, 2017 — two days before his inauguration as president in Washington, Politico reported.

Trump’s lawyers and attorneys representing the plaintiffs in the three class-action lawsuits asked US District Judge Gonzalo Curiel to approve the settlement.

The agreement would end the possibility that Trump — who during the presidential campaign said Curiel should recuse himself from the case because of his Mexican heritage — could face a federal civil trial as president.

“By any metric, this is a fair, adequate and reasonable settlement,” the lawyers said. “Both plaintiffs and defendants believe in the merits of their cases and compromised to reach this result.”

The lawsuits claimed the real estate seminars conducted through the university Trump created in 2005 were deceptive and designed only to coax more money from attendees to buy into higher-priced “apprenticeship” programs. Prices ranged from $1,500 for a three-day seminar to up to $35,000 for a mentorship program.

Trump U promised to teach students the techniques Trump himself used to make billions in the real estate business and would be taught by teachers the mogul personally picked.

The approximately 6,000 former students covered by the settlement will receive half their money back, according to the settlement.

Nearly $21 million of the settlement amount will be used to pay victims in the lawsuit brought by New York Attorney General Eric Schneiderman.

Trump’s lawyers shrugged off any claims of fraud.

“While Plaintiffs are confident in the strength of their class claims, Defendants were confident in their defenses. Plaintiffs acknowledge the risk that they would be unable to obtain a jury verdict against Defendants, and TU’s financial condition meant collecting any judgment against it would be difficult,” the attorneys for both sides wrote in the court papers.

Trump settled the cases a week after he was elected president in November and a week before the trial was to begin on Nov. 28.

At the time, his lawyers said they were confident they would have won the case, but decided to resolve the cases because Trump had more pressing concerns.

A few days later, Trump tweeted: “I settled the Trump University lawsuit for a small fraction of the potential award because as President I have to focus on our country.”