NEW YORK — President Donald J. Trump's foundation served as a personal piggy bank for his businesses, legal bills and presidential campaign, according to a lawsuit filed Thursday by state Attorney General Barbara Underwood against the foundation, the president and his three oldest children.

The claim by Underwood, a Democrat, seeks $2.8 million in restitution and additional penalties from Trump, Donald J. Trump Jr., Eric Trump and Ivanka Trump and requests the dissolution of the Donald J. Trump Foundation.

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

The investigation, which began in June of 2016 under former Attorney General Eric Schneiderman, a persistent critic of the president, reported the foundation's board neglected its duties for nearly two decades, identified five instances where foundation funds were used to benefit Trump and his businesses and cited examples of the foundation being directly controlled by Trump's presidential campaign to aid in the election effort.

A statement from the Trump Foundation said Schneiderman used his pursuit of Trump to further his own political goals and Underwood was continuing the political attacks.

Schneiderman resigned in May after a story in The New Yorker said he beat and choked several women. The state Legislature picked Underwood to succeed him.

The attorney general's office alleges the foundation funds were used to pay a $100,000 settlement on behalf of Trump's Palm Beach, Fla., golf club, Mar-A-Lago; $158,000 to settle a claim against Trump National Golf Club; $10,000 to purchase a painting displayed at Trump National Doral, a Miami golf club; and $32,000 to make good on a pledge from a Trump business.

The lawsuit argues the Trump presidential campaign became intertwined with the foundation, including campaign staff directing the disbursement of funds from the charity.  The investigation found that at least five grants of $100,000 were distributed to groups in Iowa in the days leading up to the Iowa caucuses in the campaign for the Republican nomination.

"In 2016, the (foundation) board knowingly permitted the foundation to be co-opted by Mr. Trump's presidential campaign, and thereby violated its certificate of incorporation," the lawsuit states.

Trump repeatedly signed federal and state paperwork noting the prohibition on the charity engaging in political activities or personally benefiting any of the charity's board and officers, according to the lawsuit.

The claim alleges that the foundation's board provided no oversight and hasn't met since 1999.  "The foundation's directors failed to meet basic fiduciary duties and abdicated all responsibility for ensuring that the foundation's assets were used in compliance with the law," according to the lawsuit.

"In the absence of a functioning board, Mr. Trump ran the foundation according to his whim, rather than law," the suit states. "Mr. Trump, who was the sole signatory on the foundation's bank accounts, approved all grants and other disbursements from the foundation."

Trump's eldest children joined the foundation's board in 2006, with Ivanka Trump departing in 2017 to join the presidential administration.

The attorney general's sent referral letters to the IRS and Federal Election Commission that identified potential federal crimes that warrant future legal review. The lawsuit also seeks an injunction to prevent any actions by the foundation prior to a ruling on its dissolution.

New York law gives the state attorney general's office the authority to oversee the activities of not-for-profit corporations and many of the violations cited in the lawsuit stem from the state's non-profit-corporation law.

Legacy of Schneiderman

Schneiderman, a Democrat, had been a thorn in Trump's side since 2013 and dogged him during the presidential campaign and first year in office.

In 2013, Schneiderman brought a fraud case against Trump University, which resulted in a $25 million settlement in November 2016. Trump did not admit personal wrongdoing, and the settlement resolved the New York case and two federal class-action suits.

Trump — who in 2015 called Schneiderman "a total lowlife, a sleaze-bag" — filed a complaint with the state Joint Commission on Public Ethics in 2013, claiming that Schneiderman tried to shake down Trump's relatives for campaign contributions before filing the Trump University lawsuit. JCOPE dismissed the complaint in 2015.

Schneiderman began investigating the foundation following Washington Post reports that foundation spending personally benefited the presidential candidate. In October 2016, a month before the election, 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.

On Thursday, a Trump Foundation representative said in a statement provided to CNN, "This is politics at its very worst."

"The foundation currently has $1.7 million remaining which the (New York attorney general) has been holding hostage for political gain," the representative said. "This is unconscionable - particularly because the foundation previously announced its intention to dissolve more than a year and a half ago."

During her interview in May with the Legislature's committee vetting attorney general candidates to replace Schneiderman, Underwood highlighted the office's challenges to Trump's administration, including on immigration and environmental issues.

Assemblyman William Barclay, a North Country Republican, asked if Underwood would continue to file claims against the Trump administration.

"I don't have any plan to discontinue existing cases, and I don't have any plan to abandon the
effort to challenge injustice and lawless behavior that hurts New Yorkers where I find it," Underwood responded.

Following similar questioning from Bronx Democratic Assemblyman Jeffrey Dinowitz, she said,  "I believe if the law is being violated, even if it's being violated by the president of the United States, it's the obligation of the attorney general to pursue the interests of the people of the state of New York, and I certainly would do the same thing."

David.Lombardo@timesunion.com - 518.454.5427 - @poozer87