Donald Trump: This time John Wayne does not walk off into the sunset with Grace Kelly. Photo-Illustration: Daily Intelligencer; Photos: Getty Images (Trump); Twentieth Century Fox (Die Hard)

One of the clichés of the action-movie script is the final-scene twist where the villain, having seen his intricate plot foiled, lashes out in a wild and pointless act of vengeance. Think of Alan Rickman in Die Hard as he falls out of a skyscraper window trying to shoot Bruce Willis, or Dennis Hopper’s character in Speed deciding that if he can’t get his ransom he might as well try to kill Keanu Reeves:

The repeal of Obamacare has a similarly clichéd story arc. After John McCain returned from cancer to cast the deciding suspenseful vote on the Senate floor, President Trump has taken defeat in perfect movie-villain form. If Congress won’t repeal Obamacare, he warns, he will destroy it anyway, by withholding important payments to insurers on the exchanges.

The payments Trump is threatening to withhold are called cost-sharing-reduction payments, or CSRs. Obamacare authorized these payments as reimbursements for insurers who sign up disproportionate numbers of low-income customers. Without the payments, insurers would increase premiums. As part of their sabotage campaign against Obamacare, Republicans in Congress filed suit in 2014 to end the payments, resting their case on a legal fine point that the legislation promised the payments but did not technically appropriate them.

The legal merits of the lawsuit are not terribly impressive. There are, however, two primary ways the threat can harm Obamacare’s exchanges. The first is that Trump has regularly threatened to end the payments, and while he hasn’t withheld any yet, his threats have created an unpredictability that has scared many insurers into leaving the marketplaces (which Trump holds up as evidence that Obamacare is “collapsing”). The second, larger danger is that Trump’s Department of Justice, which is defending the Executive branch in the lawsuit, would give up its defense. The lawsuit doesn’t have to be strong if the defendant doesn’t challenge it.

The second danger is now gone. The D.C. Circuit Court ruled last night that state attorneys general have legal standing to defend the payments. The court cited Trump’s constant threats as reason for the states to step in to defend a law the administration is unwilling to defend itself. “Their doubts about adequate representation arose due to accumulating public statements by high-level officials both about a potential change in position and the Department’s joinder with the House in an effort to terminate the appeal,” the court found. “In other words,” University of Michigan law school professor Nicholas Bagley observes, “President Trump’s loose lips have once again created problems for his lawyers.”

Trump still has the ability to stop the payments on his own. He has been cutting the checks month to month, insisting he could stop them at any time. But members of both parties in Congress have expressed strong support for keeping up the payments. Democrats don’t want to harm patients and the operation of a system they care about a lot, and Republicans don’t want to suffer the political blowback from premium spikes under their watch when they have promised lower premiums. Both parties are negotiating bills to ensure the payments are made. Trump might stand in the way of this bipartisan agreement, but he will further alienate a Congress that is already disregarding him.

It is not clear what rationale Trump has to threaten to harm the insurance system. He has no leverage here — Democrats are hardly going to support a bill that would throw millions of people off their insurance just to avoid higher costs for a smaller number of people. As his own party recognizes, sowing chaos is only going to create voter anger at the party in control of government. Blaming the other party for the status quo never works. And so Trump is left with nothing but blind rage, lashing out wildly in the face of defeat.