NEW YORK (CBSNewYork/AP) — A lawsuit filed by New York’s attorney general Thursday said President Donald Trump used his charitable foundation to settle personal business disputes and bolster his political image with donations directed by his staff.

The Donald J. Trump Foundation “was little more than a checkbook for payments from Mr. Trump or his businesses to nonprofits, regardless of their purpose or legality,” Democratic Attorney General Barbara Underwood said as she sued to dissolve the foundation and seek $2.8 million in restitution.

“This is not how private foundations should function and my office intends to hold the Foundation and its directors accountable for its misuse of charitable assets,” Underwood said in a statement.

The lawsuit says the foundation illegally helped support the Republican’s campaign by raising money at a nationally televised fundraiser in January 2016, then allowing campaign staffers to dictate how the money was spent in grants.

“There’s no reason why a foundation owned and operated by a sitting president should be exempt from the laws that we routinely apply to other foundations,” said Underwood.

The lawsuit was filed against the foundation and its directors, Trump and his children Donald Trump Jr., Eric Trump and Ivanka Trump.

Trump quickly took to Twitter after the lawsuit was filed, calling the case “ridiculous” and saying that the foundation “gave out to charity more money than it took in.” He also said he would not settle the lawsuit.

Trump made a similar claim that he wouldn’t settle a lawsuit charging that his Trump University misled customers, but ultimately paid a $25 million settlement last year.

The Trump Foundation said in a statement that a lawsuit filed against it by New York’s attorney general is “politics at its very worst.” It defended its record, saying it had donated over $19 million to worthy charitable causes.

The Foundation said it had been planning to shut down for more than a year, but had been stopped from doing so because of the state’s investigation.

It also said it had $1.7 million remaining to give out to charity “that the NYAG has been holding hostage for political gain.”

The foundation’s mission says its funds are to be used “exclusively for charitable, religious, scientific, literary or educational purposes,” either directly or through other organizations, according to the court filing. In keeping with federal tax rules, the charity’s incorporation documents say none of its resources can directly or indirectly go to the benefit of its directors or officers and none of its activities can benefit any political candidate, the filing notes.

Underwood’s predecessor, Democrat Eric Schneiderman, began investigating the foundation in 2016 following Washington Post reports that its spending personally benefited the presidential candidate. Schneiderman ordered the foundation to stop fundraising in New York.

The Trump campaign, at the time, said the foundation intended to cooperate with the investigation. The campaign had previously called Schneiderman “a partisan hack” who backed Trump’s 2016 Democratic rival, Hillary Clinton.

Schneiderman resigned last month after allegations that he abused women he had dated; he denied the claims.

(© Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)