Students in the U.S. who said they were deceived by President Donald Trump's now-defunct Trump University can now get most of their money back, according to a ruling Tuesday by a federal appeals court.

The 9th Circuit U.S. Court of Appeals in San Francisco upheld a March 2017 agreement requiring Trump to pay $25 million dollars to settle class-action lawsuits accusing his school of fraud after failing to deliver on promises to teach them how to succeed in the real estate sector.

In doing so, the court rejected a challenge from student Sherri Simpson to opt out of the deal and sue Trump for the $19,000 she paid for classes and a mentorship program.

Simpson, a Florida bankruptcy lawyer, did not withdraw from the agreement initially and said she had the right to do so before it was finalized. The court disagreed, saying neither notices to affected students nor due process gave Simpson a second chance to opt out.

Simpson's attorneys had maintained that notices sent to thousands of students earlier in the case promised the right to withdraw from the lawsuits immediately or after any proposed settlement was presented.

"Reading the notice as a whole and in context, we conclude that it promised only one opportunity to opt out," Judge Jacqueline Nguyen wrote for the three-judge panel.

The court also said U.S. District Judge Gonzalo Curiel had good reason to approve the agreement in March. Trump fueled the controversy by repeatedly suggesting Curiel's Mexican heritage made him biased against him. Trump vowed never to settle. But after winning the 2016 presidential election, he said he did not have time for a trial. Trump did not acknowledge any wrongdoing under the terms of the settlement. Trump's attorneys did not immediately respond to a request for comment.

Simpson's lawyers also did not immediately respond to requests for comment.

But Amber Eck, a lawyer representing some of the plaintiffs, said, "We're obviously thrilled that the 9th Circuit rejected Ms. Simpson's objection and agreed that our $25 million settlement, which we reached nearly a year and a half ago, is fair and reasonable."

Students paid as much as $35,000 to enroll at Trump University after falsely believing they would succeed in real estate after being taught by experts handpicked by Trump, who himself is a real estate mogul. Trump University operated from 2005 to 2011.

Lawyers for the plaintiffs have said about 3,730 people are slated to receive 90 percent or more of what they paid.