A New York judge has ordered President Trump to pay $2 million to resolve allegations that he misused charitable funds for campaign purposes.

The New York attorney general’s office sued Trump and three of his children in June 2018, alleging they had solicited tax-deductible donations for a veterans fundraiser in Des Moines in January 2016. The lawsuit alleged that the Donald J. Trump Foundation was improperly coopted for political purposes.

Trump has already agreed to dissolve the charity and distribute its remaining funds — about $1.8 million — to various other charitable groups, including the U.S. Holocaust Memorial Museum, the United Negro College Fund and the Children’s Aid Society.

In his order on Thursday, Judge Saliann Scarpulla ordered Trump to pay an additional $2 million to the charities.

Trump held the veterans fundraiser on Jan. 28, 2016, the same night as the Fox News debate among the other Republican presidential candidates. Trump was boycotting the debate because he did not like moderator Megyn Kelly’s questions at a previous Fox News debate.

The New York attorney general alleged that the fundraiser ran afoul of state law governing charitable organizations. The suit noted that the event made use of the campaign’s slogan, Make America Great Again, and that campaign personnel were involved in deciding how the money would be allocated.

The event raised $5.6 million, of which about $2.8 million went to the Trump Foundation. The remainder was given directly to veterans groups. The attorney general’s office sought a damages award of $2.8 million, but Scarpulla lowered that to $2 million, noting that the $2.8 million in contributions did end up going to veterans’ charities.

Scarpulla denied the attorney general’s request to award punitive damages in the case.