By ELLIOT SPAGAT

SAN DIEGO (AP) — A judge on Friday approved an agreement for President Donald Trump to pay $25 million to settle lawsuits over his now-defunct Trump University, ending nearly seven years of legal battles with customers who claimed they were misled by failed promises to teach success in real estate.

Related Articles Update: CDC drops controversial testing advice that caused backlash

US will ban TikTok and WeChat downloads on Sunday

Federal judge blocks Postal Service changes that slowed mail

Coronavirus: Barr slammed for ‘tone-deaf’ comments that compare shelter-in-place ordinances to slavery

TV tonight: President Trump answers questions in town-hall event U.S. District Judge Gonzalo Curiel’s ruling settles two class-action lawsuits and a civil lawsuit by New York Attorney General Eric Schneiderman.

Trump had vowed never to settle but said after the election that he didn’t have time for a trial, even though he believed he would have prevailed. Under terms of the settlement, he admits no wrongdoing.

The White House did not immediately respond to a request for comment on the ruling.

The lawsuits alleged that Trump University gave nationwide seminars that were like infomercials, constantly pressuring people to spend more and, in the end, failing to deliver.

Attorneys for former customers have said their clients will get at least 90 percent of their money back, based on the roughly 3,730 claims submitted.

Trump University dogged the Republican businessman throughout the campaign as rivals used Trump’s depositions and extensive documents filed in the lawsuits to portray him as dishonest and deceitful.

Trump brought more attention by repeatedly assailing Curiel, insinuating that the Indiana-born judge’s Mexican heritage exposed a bias.

The judge rejected requests by two former students who objected to the settlement, scuttling the possibility of derailing the agreement with the prospect of more litigation.

Sherri Simpson, a Fort Lauderdale, Florida, attorney, said she and a partner paid $35,000 in 2010 to enroll in Trump University’s “Gold Elite” program to be paired with a mentor who would teach them Trump’s secret real estate investment strategies.

Simpson, who appeared in two anti-Trump campaign ads, said they got little for their money — the videos were 5 years old, the materials covered information that could be found free on the internet and her mentor didn’t return calls or emails.

Simpson argued that she should have been given more opportunity to opt out of the settlement. Attorneys for Trump and those suing him say the deadline to opt out was in November 2015 and that she missed her chance.

Another customer, Harold Doe, objected because he wanted more money.

In clearing those final hurdles, the president brought closure to the trio of lawsuits, the first of which was filed in April 2010.

When attorneys reached a deal shortly after Trump’s election, Curiel said he hoped it would be part of “a healing process that this country very sorely needs.” A month later, he granted preliminary approval of the deal.

The settlement was announced 10 days before a trial was set to begin, sparing Trump what would have been a major distraction. The trial would have been pinned on whether a jury believed Trump misled customers by calling the business a university when it wasn’t an accredited school and by falsely advertising that he hand-picked instructors.

Court documents unsealed last year revealed strategies for enticing people to enroll even if they couldn’t afford it. The documents outlined how employees should guide people through “the roller coaster of emotions” after they express interest and tells employees to be “very aggressive during these conversations to in order to push them out of their comfort zones.”

Transcripts of about 10 hours of Trump depositions provided additional material to rivals, though Curiel denied a request to release video of Trump’s testimony that would have likely been used in campaign attack ads. Trump acknowledged in the depositions that he played on people’s fantasies, and he could not recall names of his employees despite his advertising pitch that he hand-picked them.

Trump has repeatedly claimed a 98 percent customer satisfaction rate on internal surveys. Plaintiffs countered that students were asked to rate the product when they believed they still had more instruction to come and were reluctant to openly criticize their teachers on surveys that were not anonymous.