The Trump Foundation, the charitable foundation started by President Donald Trump years before he became a presidential candidate, which New York's top prosecutor said exhibited a "shocking pattern of illegality," will dissolve according to a court filing.

The foundation will give away its assets to other non-profit organizations in the next 30 days.

The Attorney General’s Office for New York says that this agreement that they’ve entered into with the Trump Foundation and signed by foundation attorney Alan Futerfas.

It does not stop the lawsuit by AG’s office has filed against the foundation, which was formed in 1987 and that action will continue.

“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," state AG Barbara Underwood said in a statement.

"This amounted to the Trump Foundation functioning as little more than a checkbook to serve Mr. Trump’s business and political interests."

This is a breaking story. Check back for updates.