The White House is blasting a lawsuit filed by New York's attorney general against President Donald Trump and his foundation, suggesting that is politically motivated.

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.

The lawsuit alleges that Trump and his adult children used the charity's money to settle disputes in his business empire and promote his political fortunes during his run for the White House.

The lawsuit seeks $2.8 million in restitution, additional unspecified penalties and the foundation's dissolution. Trump had already pledged to dismantle it.

The Trump Foundation says in a statement that a lawsuit filed against it by New York's attorney general is "politics at its very worst."

The suit filed Thursday says President Donald Trump illegally used the charity to pay legal settlements related to his golf clubs, buy a painting of himself and bolster his political image with donations directed by his campaign staff.

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

Trump Foundation Accused
U.S. President-elect Donald Trump stands surrounded by his son Eric Trump, daughter Ivanka and son Donald Trump Jr. ahead of a press conference in Trump Tower, Manhattan, New York, U.S., January 11, 2017. REUTERS/Shannon Stapleton

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

President Donald Trump is declaring that he "won't settle" a lawsuit from the New York attorney general alleging that the Trump Foundation engaged in pattern of illegal self-dealing.

The president is calling it on Twitter a "ridiculous case" that former state Attorney General Eric Schneiderman "never had the guts to bring" forward before he "resigned his office in disgrace."

The lawsuit, brought by current state Attorney General Barbara Underwood, alleges that the president's charitable foundation served as a personal piggy bank for his businesses, legal bills and presidential campaign. The lawsuit targets the foundation, Trump and three of his children.

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.

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