The New York Attorney General's office announced Thursday that a judge has ordered President Trump to pay $2 million in damages for improper use of funds at the Trump Foundation in connection with the 2016 presidential primaries and his own political purposes, as part of a lawsuit Trump and the foundation settled with state Attorney General Letitia James.

James' office had requested $2.8 million in restitution and a $5.6 million penalty, but Judge Saliann Scarpulla decided $2 million was a more reasonable restitution amount and declined to issue a penalty.

As part of the settlement, Trump admitted to misusing Trump Foundation funds and agreed to limitations placed on future charitable work. If he chooses to start a new charitable organization, he would have to report it to the state attorney general's office, according to an announcement from James' office.

TRUMP FOUNDATION AGREES TO DISSOLVE AFTER LAWSUIT ALLEGED 'ILLEGAL CONDUCT'

"The Trump Foundation has shut down, funds that were illegally misused are being restored, the president will be subject to ongoing supervision by my office, and the Trump children had to undergo compulsory training to ensure this type of illegal activity never takes place again,” Attorney General Letitia James said in statement. “The court’s decision, together with the settlements we negotiated, are a major victory in our efforts to protect charitable assets and hold accountable those who would abuse charities for personal gain."

But Trump himself released a statement on Twitter on Thursday night saying James is “deliberately mischaracterizing this settlement for political purposes."

The state filed the lawsuit against the Trump Foundation in June 2018, and the settlement includes four stipulation agreements, the first of which was fulfilled when the Trump Foundation agreed to shut down in Dec. 2018. The other three stipulations were added in Oct. 2019. They include distribution of the remainder of the foundation's assets to charities approved by James' office, training for the president's children Ivanka, Eric, and Donald Jr., and 19 paragraphs of Trump's admissions of illegal activity.

Those admissions include failure of the foundation's board to meet or engage in proper oversight, and details regarding coordination with Trump's 2016 campaign, including a Trump Foundation fundraiser that the campaign organized, and use of foundation funds to pay legal obligations, and for a $10,000 portrait of Trump. As part of the settlement, James' office said, Donald Trump Jr. reimbursed the foundation for the portrait.

CLICK HERE FOR THE FOX NEWS APP

The Attorney General's office stated that the $2 million in damages and the remaining $1.78 million that the foundation has will go to Army Emergency Relief, the Children’s Aid Society, Citymeals-on-Wheels, Give an Hour, Martha’s Table, United Negro College Fund, United Way of National Capital Area, and the U.S. Holocaust Memorial Museum.

In a statement, a Trump Foundation spokesperson said the foundation was "pleased to donate an additional $2 million" to those organizations.

"Following the 2016 presidential election, the Trump Foundation publicly announced its intention to voluntarily dissolve and distribute all of its remaining funds to charity," the statement said.

It continued: "Unfortunately, that donation was delayed due to the Attorney General’s politically motivated lawsuit. We are pleased that the Court, in rejecting the Attorney General’s frivolous request for statutory penalties, interest and other damages, recognized that every penny ever raised by the Trump Foundation has gone to help those most in need. Now that this matter is concluded, the Trump Foundation is proud to make this additional contribution."

Fox News' John Roberts contributed to this report.