ObamaCare could soon be history, thanks to a lawsuit filed by 20 states that claim the Affordable Care Act is no longer constitutional. US Attorney General Jeff Sessions is so sure the states are right that he’s folding his cards. In a rare move, the Justice Department won’t defend a federal law.

The lawsuit argues that last December, when Congress repealed the penalty for not having ObamaCare insurance, it removed the only constitutional grounds for ObamaCare.

Remember that in 2012, the first time the constitutionality of the health law was challenged, Chief Justice John Roberts slyly called the penalty for not having insurance a “tax” and justified a 5-4 ruling in favor of the law by arguing that the US Constitution gives the federal government the power to tax.

Voila, the tax is gone, and with it the flimsy constitutional underpinning of the ObamaCare scheme.

President Trump was on the mark, declaring that “ObamaCare is over” as he signed the tax-reform bill that included repeal of the health care “tax” penalty. At his State of the Union Address, he stated again that “we essentially repealed ObamaCare because we got rid of the individual mandate.”

The media and Democrats ridiculed these statements as typical Trump hyperbole. But Trump’s insight is the central argument being made by the 20 states: Texas and Wisconsin are joined in their lawsuit by Alabama, Arkansas, Arizona, Florida, Georgia, Indiana, Kansas, Louisiana, Maine, Mississippi, Missouri, Nebraska, North Dakota, South Carolina, South Dakota, Tennessee, Utah and West Virginia.

The case is a slam-dunk. Remember that moment on June 28, 2012, when Roberts pulled off one of the biggest bait-and-switches? As the nation listened, he began explaining the court’s ruling on the constitutional challenge to ObamaCare.

He went to great lengths to knock down the Obama administration’s argument that it had the power under the Constitution’s Commerce Clause to compel individuals to buy health insurance and dictate what kind they buy. Roberts spoke for several minutes on how the federal government’s powers are limited and enumerated: “The Commerce Clause is not a general license to regulate an individual from cradle to grave.”

Then suddenly, Roberts shifted, explaining that the court regarded the penalty for not having ObamaCare as a “tax.” The Constitution unambiguously gives Congress the power to tax, and therefore the health law is constitutional. ObamaCare stayed the law of the land.

Roberts finessed the court out of what he likely feared was a dangerous political situation. The justices were being asked to nix President Barack Obama’s signature legislation. Yet allowing a further expansion of the Commerce Clause would have done severe damage, too, eviscerating any pretext that the federal government’s powers are limited. If Congress can make you buy health insurance, how about American cars or US Treasury bills?

But Roberts’ flim-flam ruling couldn’t endure. He built the entire constitutional justification for ObamaCare’s vast takeover of the individual insurance market on a penalty that even ObamaCare’s architects were reluctant to call a “tax.”

Once it was repealed last December, states were bound to challenge the rest of ObamaCare’s insurance regulations, including rules on how to price policies and what must be covered.

Nancy Pelosi claims the challengers are “trying to destroy protections for Americans with pre-existing conditions.” Nonsense.

Pelosi wants to keep the ObamaCare rule that forces healthy people to pay the same premiums as those with serious illnesses. But 5 percent of the population uses 50 percent of the health care. The unfairness is obvious.

States are already fixing this problem — not abandoning the seriously ill but reimbursing insurers for their care out of general revenues rather than trying to foist the cost on other health-insurance buyers.

States are poised to take back the job of regulating health insurance, once the phony justification for ObamaCare is discarded. Proving once again that in politics, as in baseball, it’s not over till it’s over.

Look for more choices and lower premiums in many states — but no loss of coverage, since nearly all the newly insured are on Medicaid, which will be untouched by the court’s ruling.

Betsy McCaughey is a senior fellow at the London Center for Policy Research.