New York Attorney General Barbara Underwood nailed it Tuesday when she explained the significance of President Donald Trump agreeing to dissolve his namesake foundation amid a state probe into allegations that he used the charity for his own benefit.

“This is an important victory for the rule of law, making clear that there is one set of rules for everyone,” Underwood said.

Other institutions also are pushing back on Trump’s actions and those of his associates. Underwood’s words came the same day a Washington judge blasted former National Security Adviser Michael Flynn for lying to the FBI and one day after former FBI Director James Comey criticized Republicans for not condemning Trump’s attacks on the rule of law. Nearly every Trump organization — his business, foundation, campaign and inaugural committee — is under investigation.

Trump had no choice but to succumb to Underwood, who said her probe uncovered “a shocking pattern of illegality involving the Trump Foundation,” including coordinating unlawfully with his campaign and repeated instances of willful self-dealing.

Underwood said the findings, which followed groundbreaking reporting in The Washington Post, make clear that the foundation served “as little more than a checkbook to serve Mr. Trump’s business and political interests.” Its funds, most of which were donated by others, were used to:

Pay legal settlements for Trump’s businesses — like a $158,000 payment to a man who made a hole-in-one worth $1 million at a charity tournament at a Trump National Golf Club.

Purchase art — like a $10,000 portrait of Trump that later was hung at one of his golf clubs.

Make political donations — like a $25,000 payment to Florida Attorney General Pam Bondi’s campaign.

Help Trump’s 2016 campaign — like when $2 million raised for veterans at an Iowa fundraiser was put in his foundation with then-campaign manager Corey Lewandowski deciding how and to whom the money would be disbursed.

Underwood is right to insist that the remaining $1.75 million in the foundation’s coffers be distributed to legitimate charities subject to approval by her office and a state judge.

Sign up for The Point Go inside New York politics. By clicking Sign up, you agree to our privacy policy.

Trump has called the investigation “ridiculous” and a partisan attack. But it’s no surprise he caved. It’s what he does — deny wrongdoing, attack the accuser, promise not to settle, then do just that as inconvenient facts mount. See, for example, lawsuits filed by New York’s attorney general and others against Trump University, a case Trump derided and then settled for $25 million.

The unexpected White House announcement Tuesday of a needed ban on rifle bump stocks won’t steal the headlines from Underwood’s lawsuit or make it go away. Nor will dissolving the foundation. That’s significant. The violations of state and federal law Underwood has described are serious and the perpetrators identified in her lawsuit — Trump and children Don Jr., Eric and Ivanka as foundation directors — must be held accountable as the legal action continues.

That’s the only way Trump and his family will understand that the rule of law applies to them as well.— The editorial board