NEW YORK — A judge Thursday ordered President Trump to pay $2 million to an array of charities as a fine for misusing his own charitable foundation to further his political and business interests.

New York state Judge Saliann Scarpulla imposed the penalty after the president admitted to a series of abuses that were outlined in a lawsuit brought against him last year by the New York attorney general’s office.

Among other things, Trump acknowledged he improperly allowed his presidential campaign staff to coordinate with the Trump Foundation in holding a fund-raiser for veterans during the run-up to the 2016 Iowa caucuses. The event was designed ‘‘to further Mr. Trump’s political campaign,’’ Scarpulla said.

Advertisement

The foundation will be dissolved and its $1.7 million in remaining funds will be given to other nonprofits, under agreements reached by Trump’s lawyers and the attorney general’s office.

As part of those agreements, made public Thursday, the two sides left it up to the judge to decide what penalty Trump should pay.

The settlement was an about-face for Trump. He and his lawyers have blasted the lawsuit as politically motivated, and he tweeted, ‘‘I won’t settle this case!’’ when it was filed in June 2018.

Trump’s fine and the charity’s funds will be split evenly among eight organizations, including Citymeals on Wheels, the United Negro College Fund, and the US Holocaust Memorial Museum.

Attorney General Letitia James welcomed the resolution of the case as a ‘‘major victory in our efforts to protect charitable assets and hold accountable those who would abuse charities for personal gain.’’

‘‘No one is above the law — not a businessman, not a candidate for office, and not even the President of the United States,’’ said James, a Democrat.

The president admitted, among other things, to improperly arranging for the charity to pay $10,000 for a 6-foot portrait of him. He also agreed to pay back $11,525 in foundation funds that he spent on sports memorabilia and champagne at a charity gala.

Advertisement

Trump also accepted restrictions on his involvement in other charitable organizations. His three eldest children, who were members of the foundation’s board, must undergo mandatory training on the duties of those who run charities.

Charities are barred from getting involved in political campaigns, but in weighing the Iowa fund-raiser, Scarpulla gave Trump credit for making good on his pledge to give $2.8 million that his charity raised to veterans’ organizations.

Instead of fining him that amount, as the attorney general’s office wanted, the judge trimmed it to $2 million and rejected a demand for punitive damages and interest.

The Trump Foundation said it was pleased by those decisions, claiming that the judge ‘‘recognized that every penny ever raised by the Trump Foundation has gone to help those most in need.’’

Trump Foundation lawyer Alan Futerfas said the nonprofit has distributed approximately $19 million over the past decade, including $8.25 million of the president’s own money, to hundreds of charitable organizations.

At the time of the Iowa fund-raiser, Trump was feuding with then-Fox News anchor Megyn Kelly and refusing to participate in the network’s final Republican presidential primary debate before the Iowa caucuses.

Instead, he held a rally at the same time as the debate at which he called on people to donate to veterans’ charities. The foundation acted as a pass-through for those contributions.

Advertisement

James said the evidence of banned coordination between campaign officials and the foundation included e-mails exchanged with then-Trump campaign manager Corey Lewandowski.

In one e-mail, a Trump company vice president asked Lewandowski for guidance on precisely how to distribute the money raised.

Trump also admitted in the agreements to directing that $100,000 in foundation money be used to settle legal claims over an 80-foot flagpole he had built at his Mar-a-Lago resort in Palm Beach, Fla., instead of paying the expense out of his own pocket.

In addition, the foundation paid $158,000 to resolve a lawsuit over a prize for a hole-in-one contest at a Trump-owned golf course, and $5,000 for ads promoting Trump’s hotels in the programs for charitable events. Trump admitted these transactions were also improper.

As part of the settlement, Donald Trump Jr. reimbursed the Trump Foundation for the cost of the portrait.