President Donald Trump has been ordered to pay $2 million to nonprofit organizations to resolve a lawsuit that accused the Trump Foundation and his children of unlawfully using money raised in charity events for the 2016 presidential campaign.

But in relief for the president, the New York State judge did not ban Trump and his children from sitting on the board of any other New York nonprofit. The court did not slap punitive damages on Trump either.

"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," New York Attorney General Letitia James said.

"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," James added.

Most memorable events of 2016
Republican U.S. presidential candidate Donald Trump waves with his daughter Ivanka (L), his son Eric's wife Lara Yunaska (2nd R) and his wife Melania (R) at his side after speaking at a campaign victory party after rival candidate Senator Ted Cruz dropped out of the race for the Republican presidential nomination following the results of the Indiana state primary, at Trump Tower in Manhattan, New York, U.S., May 3, 2016. Reuters

What was the alleged campaign fraud?

The President breached fiduciary duty to the Foundation and allowing his campaign to orchestrate a televised in Des Moines, Iowa, in January 2016, the proceeds from which were used for the presidential campaign, the order concluded. The event was ostensibly held as a fundraiser for the foundation but the president and his children allowed the campaign to involve in the distribution of the money.

The lawsuit, filed by the New York Attorney General's office. The lawsuit alleged that the Trump was engaged in "persistently illegal conduct for years. The President had earlier said that he would not go for a settlement in the case.

The fundraiser in 2016 had collected $3 million in donations from the veterans. The NY Attorney alleged that Trump campaign manager Corey Lewandowski was then allowed to use the money for Trump's election campaign.

What are the settlement terms?

As part of the settlement, Trump admitted to personally misusing funds at the Trump Foundation for election campaigns. Last year Trump Trump and his children Ivanka, Eric, and Donald Jr. shut down the Trump Foundation. The Foundation had earlier agreed to give as much as $1.7 million to the same charities that had raised the funds. The State Attorney also said Trump will continue to be under 'ongoing supervision'.

What is Trump's response?

Ivanka Trump
Hyderabad: US President Donald Trump's daughter and Advisor Ivanka Trump during Global Entrepreneurship Summit (GES) 2017 in Hyderabad on Nov 29, 2017. IANS

While the Trump Foundation said it was pleased to donate money for the charity, the President defended the charitable works the Foundations has done in the past. "I am the only person I know, perhaps the only person in history, who can give major money to charity ($19M), charge no expense, and be attacked by the political hacks in New York State. No wonder we are all leaving! Every penny of the $19 million raised by the Trump Foundation went to hundreds of great charitable causes with almost no expenses," Trump tweeted.

Who will get the money back?

The charities that will get the funds back are Army Emergency Relief, Children's Aid Society, Citymeals-on-Wheels, Give an Hour, Martha's Table, United Negro College Fund, United Way of National Capital Area, and U.S. Holocaust Memorial Museum, NPR reported.