One of the bigger headaches hanging over Donald Trump as he enters the transition period of his presidency, was the ongoing litigation that his now defunct Trump University defrauded students. Well, no more. Moments ago, the president-elect agreed to settle fraud lawsuits relating to his Trump University series of real estate seminars for $25 million.

Trump settles despite tweeting in late February that he would not settle "out of principle" as the University has a 98% approval rating.

The settlement ends a dispute that dogged Trump throughout his presidential election campaign and led to one of the more controversial moments of his run when he claimed the judge overseeing two of the cases was biased because he was of Mexican ancestry. Lawyers for the president-elect have been arguing against students who claim they were they were lured by false promises into paying up to $35,000 to learn Trump's real estate investing "secrets" from his "hand-picked" instructors.

There were three lawsuits relating to Trump University: two class actions suits in California and a case brought by New York Attorney General Eric Schneiderman. All of the cases would be covered in the possible settlement, the person said. Schneiderman has said over 5,000 students across the country were defrauded out of about $40 million.

This is what NY AG Schneiderman said:

In 2013, my office sued Donald Trump for swindling thousands of innocent Americans out of millions of dollars through a scheme known at Trump University... 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,” N.Y. Atty General Eric T. Schneiderman says in statement.

As part of settlement, Trump will pay $1m in penalties to N.Y. for violating education laws.

The $25 million settlement agreement would include roughly $4 million to resolve Schneiderman's claims.

U.S. District Judge Gonzalo Curiel, who is presiding over the two California cases, had urged both sides to settle.

Trump said during his election campaign that Curiel, who was born in Indiana to Mexican immigrant parents, could not be impartial because of Trump's campaign pledge to build a wall on the U.S.-Mexico border to control illegal immigration. A trial in one of the cases was scheduled to begin on Nov. 28 in U.S. District Court in San Diego

Below is Schneiderman's full statement: