The Trump Foundation, the charity arm of President Donald Trump’s private real estate company, will be shut down as part of a settlement in an ongoing lawsuit filed by the New York Attorney General. The news came Tuesday after a ruling by a New York state Supreme Court judge in the case.

The named defendants — including POTUS and the foundations directors Donald Jr and Eric Trump, and daughter and advisor to the President Ivanka Trump — agreed to dissolve the foundation, “annulling its Certificate of Incorporation, and terminating the corporate existence of the Foundation.” The existing funds will be redistributed to other charities via judicial supervision.

The New York Attorney General’s Office said the lawsuit, which alleges a pattern of illegal conduct occurring over more than a decade that includes unlawful political coordination with the Trump presidential campaign and self-dealing to Donald Trump’s personal and business interests, remains ongoing. It is seeking $2.8 million in restitution along with other penalties, and to ban Donald Trump from serving on a New York-based charity board for 10 years and his children for a year.

“This is an important victory for the rule of law, making clear that there is one set of rules for everyone,” New York Attorney General Barbara Underwood said in a statement Tuesday. “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 state and federal law.”

The stipulation filed today and awaiting a judge’s signature comes as President Trump’s former National Security Advisor pick Michael Flynn is being sentenced this morning for lying to the FBI about his communications with Russian officials. He has been cooperating with federal authorities and special counsel Robert Mueller’s investigation.

The Trump Foundation, a private nonprofit was started in 1987. According to the New York Times, it reported about $1 million in assets per its 2016 IRS filing, the last before Donald Trump was elected president.