Donald Trump has agreed to a $25 million settlement to end the fraud cases against his now-defunct Trump University, New York’s attorney general said — a move that the president-elect said Saturday was done in order to “focus on the country.”

The settlement likely means that Trump will avoid becoming possibly the first sitting president to testify in open court.

New York Attorney General Eric Schneiderman called the settlement on Friday “a major victory for the over 6,000 victims of his fraudulent university.” Lawyers involved in the cases say the settlement applies to all three lawsuits against Trump University including two cases filed in California.

Trump commented on the settlement via Twitter on Saturday, telling his 15 million followers that the only "bad thing about winning the presidency" was not being able to fight the "long but winning" Trump University trial.

The ONLY bad thing about winning the Presidency is that I did not have the time to go through a long but winning trial on Trump U. Too bad! — Donald J. Trump (@realDonaldTrump) November 19, 2016

I settled the Trump University lawsuit for a small fraction of the potential award because as President I have to focus on our country. — Donald J. Trump (@realDonaldTrump) November 19, 2016

The trial for one of the cases had been scheduled to start Nov. 28.

The $25 million figure will be split among the students who sued, minus the legal fees.

Trump will also pay up to $1 million in penalties to the state of New York, Schneiderman said.

Related: Yes, Trump Can Be Compelled to Testify in Trump University Lawsuit

Former students of Trump University say the school fraudulently misrepresented what students would be taught and falsely claimed that instructors were handpicked by Trump.

Trump’s attorneys last week asked the judge to delay the trial until after the inauguration, citing the "critical and all-consuming" work the president-elect has to do before he takes office in January.

The deal doesn't require Trump to acknowledge wrongdoing. Trump has strongly denied the allegations and said during the campaign that he wouldn't settle.

“We are pleased to announce the complete resolution of all litigation involving Trump University," the Trump organization said in a statement on Friday. "While we have no doubt that Trump University would have prevailed at trial based on the merits of this case, resolution of these matters allows President-Elect Trump to devote his full attention to the important issues facing our great nation.”

During the campaign, Trump said Gonzalo Curiel, the federal judge in the San Diego case, was hostile to him.

"I believe he happens to be Spanish, which is fine. He is Hispanic, which is fine. And we haven't asked for recusal, which we may do," Trump said in May. "But we have a judge who is very hostile. Should've been thrown out. Wasn't thrown out."