The Donald J. Trump Foundation agreed to dissolve “under judicial supervision” on Tuesday, as part of the New York State attorney general’s lawsuit against it alleging illegal conduct and “unlawful political coordination” to benefit President Trump's personal and business interests.

Attorney General Barbara Underwood brought the suit against the Foundation in June, following a months-long investigation led by disgraced former New York Attorney General Eric Schneiderman.

On Tuesday, Underwood announced that, following a court decision in favor of the attorney general, the Foundation “signed a stipulation” agreeing to dissolve, distributing the remaining charitable assets of the Foundation “to reputable organizations approved” by her office.

“Our petition detailed a shocking pattern of illegality involving the Trump Foundation – including unlawful coordination with the Trump presidential campaign, repeated and willful self-dealing, and much more,” Underwood said in a statement Tuesday. “This amounted to the Trump Foundation functioning as little more than a checkbook to serve Mr. Trump’s business and political interests.”

NEW YORK AG FILES LAWSUIT AGAINST TRUMP FOUNDATION FOR ALLEGED 'ILLEGAL CONDUCT'; TRUMP SAYS HE 'WON'T SETTLE'

She added: “This is an important victory for the rule of law, making clear that there is one set of rules for everyone. We’ll continue to move our suit forward to ensure that the Trump Foundation and its directors are held to account for their clear and repeated violations of federal and state law.”

The suit claims that Trump used the foundation’s charitable assets to pay off his legal obligations, promote Trump brand hotels and business, and to purchase personal items. The suit also claims that the foundation “illegally provided extensive support to his 2016 presidential campaign by using the Trump Foundation’s name and funds it raised from the public to promote his campaign for presidency.”

The suit seeks to ban President Trump from future service as a director of a New York non-profit for 10 years, and ban his sons Eric and Donald Jr., and daughter Ivanka from service for one year.

In a statement to Fox News, Trump Organization attorney Alan Futerfas said the foundation has been looking to shut down since Trump was elected to office.

“Contrary to the NYAG’s misleading statement issued earlier today, the Foundation has been seeking to dissolve and distribute its remaining assets to worthwhile charitable causes since Donald J. Trump’s victory in the 2016 Presidential election," Futerfas said in a statement to Fox News. "Unfortunately, the NYAG sought to prevent dissolution for almost two years, thereby depriving those most in need of nearly $1.7 million. Over the past decade, the Foundation is proud to have distributed approximately $19 million, including $8.25 million of the President’s personal money, to over 700 different charitable organizations with virtually zero expenses. The NYAG’s inaccurate statement of this morning is a further attempt to politicize this matter.”

WHERE ARE TRUMP FOUNDATION FUNDS ACTUALLY GOING?

Underwood took over the investigation into the organization in May, after Schneiderman stepped down following the publication of a damning report by The New Yorker, detailing four women’s claims that he had repeatedly hit them, threatened them and demeaned them. The graphic accusations included choking a former girlfriend and demanding another, who was born in Sri Lanka and whom Schneiderman reportedly referred to as his “brown slave,” call him “Master.”

The Manhattan District Attorney opened an investigation into Schneiderman following the explosive report that prompted his stunning fall from grace.

Fox News' Kristin Brown and Lissa Kaplan contributed to this report.