New York's attorney general says President Donald Trump's foundation served as a personal piggy bank for his businesses, legal bills and presidential campaign.

Democratic Attorney General Barbara Underwood filed a lawsuit Wednesday against the foundation and its directors, Trump and his children Donald Trump Jr., Eric Trump and Ivanka Trump. The suit seeks $2.8 million in restitution and the dissolution of the foundation.

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

On Twitter, President Trump called it a "ridiculous case." 

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 says in a statement the lawsuit "politics at its very worst."

The Foundation defended its record, saying it had donated over $19 million to worthy charitable causes.

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

White House press secretary Sarah Huckabee Sanders told reporters that Attorney General Barbara Underwood was "outrageously biased." Sanders also blasted Underwood's predecessor - Eric Schneiderman, who resigned last month - for being a longtime Trump antagonist.

Sanders said the alleged bias was "problematic."

Underwood and Schneiderman are Democrats. Trump is a Republican.

(Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)