Donald Trump has agreed to a $25 million (£20.1 million) settlement over three lawsuits involving his now-defunct Trump University.
About 7,000 students would be eligible for refunds if US district judge Gonzalo Curiel approves the settlement.
Under the terms of the deal, Trump admits no wrongdoing in settling two federal class-action lawsuits in San Diego and a civil suit brought by New York attorney general Eric Schneiderman.
The agreement came 10 days before jury selection was scheduled to begin in San Diego in the oldest case, which was filed in April 2010. The complaint accused Trump University, which was not an accredited school, of defrauding students who paid up to $35,000 (£28,000) a year to enrol in courses which promised to share Trump's real estate secrets.
Trump denied the allegations and said during his successful presidential campaign that he would not settle. He told supporters at a May rally that he would come to San Diego to testify after winning the presidency.
Trump said at the time: "I could have settled this case numerous times but I don't want to settle cases when we're right. I don't believe in it. And when you start settling cases, you know what happens? Everybody sues you because you get known as a settler. One thing about me - I am not known as a settler."
Two days after the election, Trump's lead attorney in the San Diego cases, Daniel Petrocelli, said he was "all ears" to settlement talks and accepted an offer to have US District Judge Jeffrey Miller of San Diego broker the negotiations.
The plaintiffs' attorney Jason Forge said the agreement was reached an hour before a hearing for Judge Curiel to weigh Trump's latest request to delay the trial until after his January 20 inauguration. He said Judge Miller's role as a mediator was "very critical".
"We were at each other's throat for six-and-a-half years and were able to find the common ground with them and do something good there," Forge told reporters.
The agreement cancelled the trial and lifted what would probably have been a major headache for Trump as he works to fill key executive branch positions and get acquainted with foreign leaders.
The thousands of former students covered by the San Diego lawsuits will be eligible to receive at least half and possibly all their money back, said Mr Forge.
Schneiderman called the agreement a "stunning reversal" for him, saying Trump "fought us every step of the way, filing baseless charges and fruitless appeals and refusing to settle for even modest amounts of compensation for the victims of his phony university. Today, that all changes."
Trump's attorneys said the settlement allows the president-elect to focus full attention on his transition to the White House.
"He was willing to sacrifice his personal interests, put this behind him, and move forward," Petrocelli said.