NEW YORK (Reuters) - A New York court on Thursday sentenced Donald Trump to pay $ 2 million in compensation as part of a friendly agreement for using his charity for political purposes.

New York Supreme Court Judge Salian Scarpola sentenced the US president to pay $ 2 million in damages to settle a civil suit brought by Democratic Justice Leticia James.

James filed a lawsuit against the Trump Society in June last year for its "permanent illegal behavior", including inappropriate coordination between charity work and the 2016 presidential campaign.

Trump agreed to close the assembly in December, but the case continued with prosecutors seeking $ 7 million in damages.

James said in a statement that the verdict is "a historic victory for our efforts to protect charitable funds and hold accountable those who use charity for personal ends."

Judge accused Trump of using the association's funds to settle legal prosecutions, promote his hotels and cover personal expenses, including buying a portrait of him for display at one of his golf clubs.

She asserts that during his 2016 presidential campaign, Trump staged a fundraiser for charity, which was in fact a campaign-related occasion.

Although the president has said in the past that he will not bargain over the dossier, he and his three sons (Donald Jr., Eric and Ivanka) have a friendly agreement with Prosecutor Leticia James to end the proceedings, according to documents.

The final part of the agreement concerns a charity event in January in Iowa.

Actually, the Trump campaign team ran the event. He managed to raise $ 2.8 million in donations during the party, but only passed through the association and was used to fund Donald Trump's campaign.

Although the money was eventually paid to an association to support veterans, the attorney general condemned the confusion between politics and humanitarian action, while Trump offered his generosity.

In a tweet on Twitter, Trump condemned "what the New York prosecutor is deliberately distorting this agreement for political purposes."

"Four years of politically motivated harassment have passed," he said. "All they found was actual charitable donations and some small technical violations like not keeping some detailed reports."

"I am the only person I know, and perhaps the only person in the world who can make large sums of money for charity," he said.

James said the president "admits to himself that he has used the funds of his association inappropriately."

The decision states that Trump has made numerous pledges to the court "that the behavior that led to these will not be repeated in the future."