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.