WASHINGTON — President Donald Trump must pay $2 million in damages for allowing his 2016 campaign to misuse money raised through his now-dissolved charity, the Trump Foundation, a judge ruled Thursday.

That money, along with $1.78 million in assets left over from the Trump Foundation, will be split among eight charities. The order is a win for the New York Attorney General's Office, which had sued Trump, his foundation, and his adult children who had served on the foundation's board — Donald Trump Jr., Ivanka Trump, and Eric Trump.

New York Supreme Court Judge Saliann Scarpulla ruled that the foundation had wrongly allowed Trump's campaign to orchestrate a fundraiser in Iowa for the charity in January 2016, and that the campaign used the event to its benefit, which was a violation of rules that govern the operation of nonprofits. Scarpulla found that Trump "breached his fiduciary duty to the Foundation and that waste occurred to the Foundation."

The New York Attorney General's Office had asked the judge to award $2.8 million in damages — representing the total amount raised at the 2016 event — but Scarpulla declined, since that money ultimately did go to charities.

"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," New York Attorney General Letitia James said in a statement. "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 Trump Foundation released a statement saying it was "pleased to donate an additional $2 million" to the eight charities identified in Scarpulla's order. The statement blamed James' office for delaying the donation by pressing the court case, and noted that Scarpulla denied the attorney general's request for additional damages because Trump had agreed to other conditions to prevent similar misconduct in the future.

The New York Attorney General's Office began investigating the Trump Foundation in June 2016. In a legal action filed in June 2018 seeking to dissolve the foundation, the office accused the Trumps and the foundation of a "pattern of illegal conduct," including that the nonprofit had been abused to benefit Trump personally as well as his campaign. The office alleged that foundation money was used to pay for legal and personal expenses, to promote Trump's businesses, and to help Trump's campaign.

In August 2018, Scarpulla largely denied the Trumps' effort to get the case tossed out, and the judge urged the two sides to try to work out a deal. In December, the Attorney General's Office and the Trumps reached an agreement — the foundation would dissolve under the court's supervision, and the Trump children would undergo in-person training on their duties as directors of charities, among other conditions. In October, the parties agreed that the $1.78 million in leftover assets would be distributed to charities and confirmed that the Trump children had completed the training.

Also as part of the agreement, if Trump himself ever wanted to serve on the board of a charity or start a new one in the future, he had to comply with certain conditions, including that the organization hire an accounting firm to monitor its money flow, that a majority of board members have no family or business relationship with Trump, and that any new organization give annual reports to the New York Attorney General's Office for the first five years.