President Donald Trump will pay $2 million to eight different charities after a state judge in New York found he had used his charitable foundation to advance his political interests during the 2016 election, and breached his duties as a financial officer of the organization in doing so.

The payment is the result of a lawsuit brought last year by the New York Attorney General's Office against the Trump Foundation over allegations that the charitable entity was misused. Trump's lawyers have argued that there has been no misconduct.

The decision handed down Thursday by Manhattan Supreme Court Justice Saliann Scarpulla means more than $3.78 million will be paid to a handful of charities by Trump and his foundation based on actions taken during his campaign for president.

Trump's three eldest children—Donald Jr., Eric and Ivanka—were also required to undergo compulsory training as a result of the litigation.

New York Attorney General Letitia James, a frequent opponent of Trump and the federal government, said Thursday's decision was a win for the state's oversight of 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," James said.

"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," she continued.

Trump was represented in the litigation by Alan Futerfas, an attorney in Manhattan. Futerfas was not immediately available to comment on the decision.

It's the latest development in the litigation, which resulted last year in an expedited timeline for the Trump Foundation being dissolved. It was already planning to shut down, but the litigation forced it to come to terms with that resolution sooner than expected.

It left behind approximately $1.7 million in assets, which were ordered to be disbursed to the various charities along with Trump's $2 million in damages from Scarpulla's judgment.

Scarpulla was critical, in the decision, of how Trump used the foundation during his campaign for president three years ago. That was also the basis of the New York attorney general's lawsuit against the foundation last year.

When the litigation was filed, former New York Attorney General Barbara Underwood said she was only seeking $2.8 million in restitution from the Trump Foundation, though it was unclear whether the state also expected a multimillion-dollar payment from Trump in the litigation.

The New York Attorney General's Office has essentially accused the Trump Foundation of working with Trump's campaign for president to hold a fundraiser for political gain, and then disbursing the money from that event strategically to boost support for his candidacy.

During the campaign, Trump chose to hold a fundraiser hosted by his charitable foundation rather than attend a debate among his opponents in the Republican primary.

The fundraiser brought in $5.6 million in donations, $2.8 million of which were contributed directly to the foundation to be disbursed separately. The remaining money was donated directly to veterans groups.

According to court filings, officials from Trump's campaign for president were involved in organizing the event. They also coordinated with the Trump Foundation to plan when the remaining funds would be disbursed, scheduling those payments for campaign events.

Trump's attorneys have argued that every cent raised at the fundraiser was ultimately given to veterans groups, and that there was no misconduct involved with the event. The foundation was used, they've said, because it could legally collect and disburse the funds.

Scarpulla, in the decision Thursday, wrote that she agreed with the attorney general's interpretation of the event, but not the amount that Trump should pay over it. New York had asked for Trump to pay the total $2.8 million disbursed at campaign events.

"As stated above, I find that the $2,823,000 raised at the fundraiser was used for Mr. Trump's political campaign and disbursed by Mr. Trump's campaign staff, rather than by the foundation," Scarpulla wrote.

"However, taking into consideration that the funds did ultimately reach their intended destinations, i.e., charitable organizations supporting veterans, I award damages on the breach of fiduciary duty/waste claim against Mr. Trump in the amount of $2,000,000, without interest," she continued.

Scarpulla declined to award penalty damages in the case, which had been requested by the Attorney General's Office and would've doubled Trump's payment.

A spokesman for the Trump Foundation said they were grateful that Scarpulla did not require any additional penalties in her decision, and said the foundation was glad to empty its accounts to the charitable groups directed in the settlement.

"We are pleased that the court, in rejecting the attorney general's frivolous request for statutory penalties, interest and other damages, recognized that every penny ever raised by the Trump Foundation has gone to help those most in need," the spokesman said. "Now that this matter is concluded, the Trump Foundation is proud to make this additional contribution."

The funds will be disbursed equally to eight charities that were approved by the Attorney General's Office: Army Emergency Relief, the Children's Aid Society, Citymeals-on-Wheels, Give an Hour, Martha's Table, United Negro College Fund, United Way of National Capital Area, and the U.S. Holocaust Memorial Museum.

READ MORE: