President Donald Trump has complied with a court order to pay US$2 million in damages after he admitted misusing his personal charitable foundation in the course of the 2016 campaign, New York’s top law enforcement official said.

Trump paid the money to eight charities chosen by the state, including the United Negro College Fund and the U.S. Holocaust Memorial Museum, New York Attorney General Letitia James said Tuesday in a statement. The Donald J. Trump foundation also distributed its remaining US$1.8 million to the same charities, meaning each will receive a total of about US$475,000.

“Charities are not a means to an end, which is why these damages speak to the president’s abuse of power and represent a victory for not-for-profits that follow the law,” James said.

New York Supreme Court Justice Saliann Scarpulla ordered Trump in November to pay US$2 million after James reached a settlement with the president and his elder children, who were on the foundation’s board, over accusations that they rampantly violated the state’s rules governing nonprofits. Their alleged infractions included using foundation money to buy sports memorabilia, Champagne and a portrait of Trump at a charity function.

The damages stemmed from the foundation’s holding of a televised event in Iowa that raised funds that were actually distributed by the Trump campaign. Though guided by political interests, the money was ultimately all donated to charity, a fact the judge cited in imposing a lower amount in damages than the US$2.8 million James had requested.

Prior to settling, Trump had argued that, because the money did end up going to charity, there was no wrongdoing. He had also asked to have the case thrown out as politically motivated, but a judge rejected that argument a year ago.