(CNN) The New York attorney general on Thursday sued President Donald Trump's charitable foundation along with its directors -- the President, his sons Eric and Donald Jr. and daughter Ivanka -- alleging they violated state and federal charities law.

"As our investigation reveals, the Trump Foundation was little more than a checkbook for payments from Mr. Trump or his business to nonprofits, regardless of their purpose or legality," Underwood said.

The attorney general is asking a court to dissolve the Trump Foundation and wants $2.8 million in restitution plus additional penalties.

She seeks to ban Trump from serving as a director of a New York not-for-profit for 10 years and the remaining board members -- Ivanka, Don Jr. and Eric Trump -- from serving for one year, or until they receive fiduciary training.

The suit alleges that the Trump Foundation engaged in "repeated and willful self-dealing transactions to benefit Mr. Trump's personal and business interests."

The suit contends that the Trump Foundation used the tax-deductible donations in at least five instances that benefited Trump or businesses he controls.

These instances include a $100,000 payment to settle legal claims against his Mar-a-Lago resort in Florida. The lawsuit contains a note from Donald Trump, which alleges that he personally directed his accounting staff to draw the $100,000 payment from the assets of the foundation to pay a legal settlement at his resort. Any personal, legal or business transactions, not having to do with the charity, should have been made from his personal or business accounts.

The suit also alleges a $158,000 payment to settle legal claims against his Trump National Golf Club in 2008 from a hole-in-one tournament; and a $10,000 payment at a charity auction to purchase a painting of Trump that was displayed at the Trump National Doral in Miami.

"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.

Underwood said that after the investigation by her office began in 2016, the foundation paid excise taxes on three of the transactions, and Trump restored funds for the transactions to the foundation. But she added that the foundation has not paid excise taxes on the Mar-a-Lago or Trump National Golf Club transactions

"This is politics at its very worst," a Trump Foundation representative said in a statement. "The Foundation has donated over $19 million to worthy charitable causes -- more than it even received. The President himself -- or through his companies -- has contributed more than $8 million. The reason the Foundation was able to donate more than it took in is because it had little to no expenses. This is unheard of for a charitable foundation. The Foundation currently has $1.7 million remaining which the NYAG has been holding hostage for political gain. This is unconscionable -- particularly because the Foundation previously announced its intention to dissolve more than a year and a half ago. The prior NYAG, who was recently forced to resign from office in disgrace, made it his stated mission to use this matter to not only advance his own political goals, but also for his own political fundraising. The acting NYAG's recent statement that battling the White House is 'the most important work (she) have ever done' shows that such political attacks will continue unabated."

The President was quick to criticize the suit, tweeting about the suit.

"The sleazy New York Democrats, and their now disgraced (and run out of town) A.G. Eric Schneiderman, are doing everything they can to sue me on a foundation that took in $18,800,000 and gave out to charity more money than it took in, $19,200,000. I won't settle this case!" he said in one tweet.

The sleazy New York Democrats, and their now disgraced (and run out of town) A.G. Eric Schneiderman, are doing everything they can to sue me on a foundation that took in $18,800,000 and gave out to charity more money than it took in, $19,200,000. I won't settle this case!... — Donald J. Trump (@realDonaldTrump) June 14, 2018

"Schneiderman, who ran the Clinton campaign in New York, never had the guts to bring this ridiculous case, which lingered in their office for almost 2 years. Now he resigned his office in disgrace, and his disciples brought it when we would not settle," he said in another tweet.

....Schneiderman, who ran the Clinton campaign in New York, never had the guts to bring this ridiculous case, which lingered in their office for almost 2 years. Now he resigned his office in disgrace, and his disciples brought it when we would not settle. — Donald J. Trump (@realDonaldTrump) June 14, 2018

Later, White House press secretary Sarah Sanders said the New York Attorney General's Office is "outrageously biased."

"The President has tweeted about this specifically earlier today. The foundation raised $18 million while giving $19 million to charity while virtually having zero expenses," Sanders said. "The previous New York AG, who was forced to retire in disgrace, made a stated mission to use this matter to advance his own political gain and the current acting New York AG has stated that battling the White House is the most important job she's ever done. That sounds outrageously biased and certainly problematic and very concerning."

Underwood also alleges that Trump's presidential campaign extensively directed and coordinated the foundation's activities in connection with a nationally televised charity fundraiser in Des Moines, Iowa, on January 28, 2016, just ahead of the Republican caucus vote there as well as the disbursements from the fundraiser. The suit says that violated the foundation's certificate of incorporation as well as state and federal law by engaging in political activity.

According to the lawsuit, Trump signed a false filing dated October 20, 2016, saying that the foundation held the fundraiser to raise money for veterans organizations.

"This statement was false because, in reality, the Fundraiser was a Trump Campaign event in which the Foundation participated," the suit said.

The lawsuit also says Trump perjured himself when he signed the foundation's incorporation paperwork because of the IRS prohibition of charities participating in political campaigns.

Underwood says Trump wrote a foundation check for $25,000 that was donated to the political committee for Florida Attorney General Pam Bondi in September 2013. The contribution was not noted on the foundation's federal tax return.

The suit notes the Trump Organization said the donation was "an inadvertent mistake."

In 2016, Trump paid a $2,500 federal excise tax with a personal check, and also reimbursed the foundation for the $25,000.

The investigation also found that the board existed in name only and did not meet after 1999. Additionally, Trump allegedly made all decisions related to the foundation. He hasn't contributed any personal funds to the foundation since 2008, the suit said.

Trump and his daughter Ivanka resigned their positions on the board shortly after he was sworn in as President. But Eric and Donald Jr. remain on the board, according to the suit.

Asked by CNN about the lawsuit as he left a New York restaurant Thursday, Donald Trump Jr. dismissed it, saying there was "nothing to talk about -- more nonsense."

But Underwood told CNN she has the facts to back up the suit.

"This is a straightforward case of violation of the laws governing charitable foundations and nonprofit corporations in New York," she told CNN's Christiane Amanpour.

In addition to filing the suit, Underwood sent letters to the Internal Revenue Service and the Federal Election Commission asking those agencies to investigate possible violations of federal law.

Both agencies declined to comment to CNN when asked about the letters.