President Donald Trump on Thursday was ordered to pay $2 million in damages after it was found his charity was being improperly used to promote his candidacy in the 2016 election.

The damages ordered by a federal judge come after New York Attorney General Letitia James’s lawsuit contended the Trump Foundation misused funds to promote Trump’s bid for the White House. The foundation later shuttered as a result of the lawsuit.

“The Trump Foundation has shut down, funds that were illegally misused are being restored, the president will be subject to ongoing supervision by my office, and the Trump children had to undergo compulsory training to ensure this type of illegal activity never takes place again,” James said.

“The court’s decision, together with the settlements we negotiated, are a major victory in our efforts to protect charitable assets and hold accountable those who would abuse charities for personal gain. My office will continue to fight for accountability because no one is above the law — not a businessman, not a candidate for office, and not even the President of the United States.”

The fine comes as Jame’s office is seeking final stipulations to end the suit, including ordering Trump to acknowledge funds from the charity were misused and agree to future restrictions on charitable service and reporting if he creates a new foundation.