In a series of Wednesday morning tweets, President Trump blasted a lawsuit from New York Attorney General Barbara Underwood that led to the Trump Foundation's dissolution as a personal attack instead of a credible legal challenge, calling it "a total double standard of 'justice.'"

The big picture: Media reports have alleged that Trump used funds from the now-shuttered foundation to pay for hundreds of thousands of dollars in legal costs among other extravagant personal expenditures. Trump has continuously denied the allegations since they first arose in late 2016, claiming "100% of money goes to wonderful charities."

How it happened: The Washington Post's David Fahrenthold first reported in September 2016 that Trump had spent $20,000 of the foundation's money to purchase a portrait of himself at a Mar-a-Lago auction.

Fahrenthold followed up with another report that Trump used $258,000 from the foundation to settle legal disputes regarding his businesses, including Mar-a-Lago, and purchased another portrait of himself for $10,000.

from the foundation to settle legal disputes regarding his businesses, including Mar-a-Lago, and purchased another portrait of himself for $10,000. New York's then-Attorney General Eric Schneiderman announced an investigation into the foundation around the same time, stating that it "may have engaged in some improprieties."

an investigation into the foundation around the same time, stating that it "may have engaged in some improprieties." Following his 2016 election win, Trump said he wanted to dissolve the foundation to avoid any appearance of conflict of interest, but the attorney general’s office refused, stating that doing so would require the its approval given the ongoing investigation.

Underwood, Schneiderman's successor, filed the lawsuit in June 2018 alleging the foundation was used for "unlawful political coordination" with the Trump campaign to benefit Trump's personal and business interests.

That led to Tuesday's decision that saw the foundation agree to dissolve in compliance with Underwood's lawsuit. The foundation’s remaining $1.75 million will be distributed to other charities approved by Underwood's office and a state judge.

What to watch: Underwood's office has said it will continue to pursue its lawsuit, which ultimately seeks $2.8 million in restitution and bans for Trump and his adult children, who also served on the foundation's board, from serving on other New York non-profit boards.

Go deeper: The 17 know Trump-related investigations