U.S. President Donald Trump is paying up after conceding that he used his charitable foundation at times as a personal piggy bank.

Trump has wired $2 million US to pay a court-ordered fine for misusing the Trump Foundation in part to further his business interests and 2016 presidential run, New York Attorney General Letitia James said Tuesday. The money will be distributed to eight charities.

About $1.8 million left in the Trump Foundation's bank account was also split among the nonprofits getting fine money, along with $11,525 that Trump paid back for spending foundation money on sports memorabilia and champagne at a charity gala.

New York state Judge Saliann Scarpulla imposed the penalty last month after Trump admitted to a series of abuses outlined in a lawsuit brought against him last year by James' office.

"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, a Democrat, said in a statement. "Funds have finally gone where they deserve — to eight credible charities."

'Pleased with the result'

Trump sent the money in the past few weeks, but that development didn't become public until the sides formally agreed Tuesday to close the case.

James' office had sought to block Trump from writing off the fine payment as a charitable donation on his taxes, but Scarpulla hasn't ruled on that request.

Trump Foundation lawyer Alan Futerfas declined to answer questions about Trump's tax plans.

In a statement, he suggested James was making a big deal about Trump's payment to distract from bad news in another case: a judge's ruling that there was no proof Exxon Mobil misled investors over the costs of climate change.

"The Foundation case settled weeks ago with all issues resolved and all funds going to charity," Futerfas said. "We are very pleased with the result."

After Scarpulla's ruling last month, Trump assailed a series of Democratic attorneys general of New York who were involved with the suit, calling it "4 years of politically motivated harassment" and saying they should have spent their time investigating the Clinton Foundation.

'I won't settle'

Trump acknowledged in a legal filing that he allowed his presidential campaign staff to co-ordinate with the Trump Foundation in holding a fundraiser for veterans during the run-up to the 2016 Iowa caucuses. Scarpulla said the event was designed "to further Mr. Trump's political campaign."

The president admitted, among other things, to arranging for the charity to pay $10,000 for a six-foot portrait of him. He has also accepted restrictions on his involvement in other charitable organizations.

The settlement was an about-face for Trump. He had 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 U.S. Holocaust Memorial Museum. Each charity is getting about $476,000.

Charities are barred from getting involved in political campaigns, but in weighing the Iowa fundraiser, 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.

At the time of the Iowa fundraiser, 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.