In order to settle a series of lawsuits that stem from the now defunct Trump University, Donald Trump has agreed to pay $25 million. This ends all of the fraud allegations from former students about the for-profit education venture, which remained over his head for years.

On Friday, the New York attorney general announced the settlement, which was 10 days prior to when one of the cases was to be heard by a jury. The case was in San Diego and it was a federal class-action lawsuit. If the settlement is approved, it will prevent an awkward and embarrassing situation that would have the next president on trial for crime, leading into running a country.

The announcement shocked everyone, because Trump is known for deriding legal settlements. He has mocked other businessmen for agreeing to settlements. The allegations would have destroyed his image as a president-elect, so it only made sense to ‘buy out’ of this lawsuit. There were complaints from students that paid up to $35,000 in tuition fees for a useless program. A former employee of the Trump University claimed that unqualified instructors were employed and they would use high-pressure sales tactics.

The settlement will eliminate all of the lawsuits and litigation, which had two federal class-action cases scheduled in San Diego. New York attorney general Eric T. Schneiderman had a separate lawsuit. In the complaints, it states how the students were cheated for thousands of dollars in tuition.

In response to the announcement, Schneiderman said, “I am pleased that under the terms of this settlement, every victim will receive restitution and that Donald Trump will pay up to $1 million in penalties to the State of New York for violating state education laws. 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.”