Donald Trump has settled three Trump University lawsuits for $ 25m (£20m), the New York Attorney General has said.
The US president-elect was being sued by former students who paid $ 35,000 (£28,000) for real estate “secrets” from his “hand-picked” instructors.
Mr Trump had repeatedly said he would not settle the class-action lawsuits.
Attorney General Eric Schneiderman said the settlement was a “stunning reversal” by Mr Trump and a “major victory” for victims.
But Mr Trump’s lawyer Daniel Petrocelli said his client was pleased with the outcome, saying “he was willing to sacrifice his personal interests, put this behind him, and move forward”.
The businessman faced three fraud lawsuits – which alleged the school misled students and failed to deliver on its promises – in California and New York.
A trial in one of the cases had been due to begin in San Diego on 28 November, although Mr Trump’s lawyers had attempted to delay the case.
Attorney General Eric Schneiderman said in a statement: “Today’s $ 25 million settlement agreement is a stunning reversal by Donald Trump and a major victory for the over 6,000 victims of his fraudulent university.
“The victims of Trump University have waited years for today’s result and I am pleased that their patience – and persistence – will be rewarded by this $ 25 million settlement.”
Mr Schneiderman, who Mr Trump has attacked as a “lightweight”, had sought a $ 40m payout from Mr Trump over the university, which closed in 2010.
He called Trump University a “fraud from beginning to end” in July, adding that the organisation used “false promises to prey on desperate people”.
US District Judge Gonzalo Curiel, who is presiding over the two California cases, had been urging both sides to settle out of court.
Analysis: Laura Bicker, BBC News, Washington
The settlement may be costly but it will save the President-elect from a potentially embarrassing trial.
Donald Trump had vowed to keep fighting this case and his attorneys said they had no doubt he would have won in court, but they added that a resolution allows Mr Trump to devote his full attention to the important issues facing the nation.
Settling though could backfire on Mr Trump as he is facing dozens of lawsuits.
Plaintiffs may smell blood and think he is eager to settle to avoid court cases while president.
In June, Mr Trump said: “I will win the Trump University case. I already am, as far as I’m concerned.
“I could settle that case. I could have settled that case. I just choose not to.”
Trump University promised students the opportunity to learn from “hand-picked” teachers, that actually were not chosen by Mr Trump himself.
Mr Schneiderman alleged that the closest students ever got to the real estate mogul was having their photo taken beside a cardboard cutout of him. He also said that Mr Trump personally pocketed about $ 5m (£4m) in the “scheme”.
Administration takes shape
Meanwhile, Donald Trump has named more conservative hardliners for key posts, with Alabama Senator Jeff Sessions nominated as attorney general, the country’s top law enforcement office.
Mr Sessions was rejected from becoming a federal judge in 1986 because of alleged racist remarks.
In a statement, Mr Trump called Mr Sessions a “world class legal mind”.
Mike Pompeo will be CIA director and retired Lt Gen Michael Flynn has been made national security adviser. Both men have been vocal critics of the Obama administration.
Gen Flynn, who was ousted as director of the Defence Intelligence Agency in 2014, agrees with Mr Trump on renegotiating the Iran nuclear deal, strengthening ties with Russia and intensifying the fight against Islamic extremists.
Mr Pompeo has also been a fierce critic of President Barack Obama’s nuclear deal with Iran, tweeting on Thursday: “I look forward to rolling back this disastrous deal with the world’s largest state sponsor of terrorism.”
Mr Trump’s Vice President-elect Mike Pence was reportedly booed on Friday as he attended a showing of the hit musical Hamilton in New York.
“At Hamilton. Mike Pence is here and the entire theater just booed him,” wrote one theatregoer on Twitter.
“Unreal scene here – Mike Pence walks in and there’s a massive mix of cheers and boos,” wrote another.