The Affordable Care Act – and the multitude of regulations, taxes and benefits that come with it – once again could be on the road to the Supreme Court after a Texas judge ruled the law unconstitutional.

The surprise decision Friday already has both sides of the debate posturing, with Democrats claiming the ruling is but a hiccup and Republicans suggesting this could be their chance, at last, to abolish the law – which remains largely in place despite President Trump’s past claims to the contrary.

A Supreme Court ruling in their favor would be Republicans’ only shot at overturning the law in the foreseeable future, with Democrats taking control of the House in January.

Speaking Sunday on CBS’ “Face the Nation,” White House senior adviser Stephen Miller boldly predicted the law would be “struck down” this way.

“I believe that's the likeliest outcome, because ObamaCare has always been unconstitutional,” he asserted.

“A confirming Supreme Court Decision will lead to GREAT HealthCare results for Americans,” Trump tweeted Monday.

If the court were to overturn the law, it would leave the Trump administration and a divided Congress in a remarkably difficult situation – scrambling to come up with an alternative that has eluded the law’s critics in Washington ever since its passage in 2010.

“We have a chance, working with the Democrats, to deliver great HealthCare!” Trump claimed.

But if the latest legal challenge to ObamaCare ends up before the Supreme Court, the outcome is far from certain. All eyes would be on Trump’s latest confirmed justice, Brett Kavanaugh, whose opinions about the health care law have been fiercely debated on the right.

Some conservative critics have accused him of providing the roadmap to save ObamaCare, citing a 2011 case where Kavanaugh dissented against the ruling but acknowledged the Affordable Care Act’s “individual mandate provision” could fit “comfortably within Congress’ Taxing Clause power.”

The Supreme Court upheld ObamaCare’s individual mandate requiring individuals to purchase health insurance in 2012. Chief Justice John Roberts sided with the court’s liberal wing in ruling that the government could in fact mandate the purchase of health insurance – under its power to tax.

But Kavanaugh’s defenders have just as adamantly argued that his 2011 dissent actually supported the conclusion that the mandate is unconstitutional.

Regardless, even if Kavanaugh and Trump-nominated Justice Neil Gorsuch were to side with the rest of the conservative wing against the law, Roberts would be needed to constitute a majority.

Where Roberts might fall this time is anybody’s guess – as the case before the lower courts strikes at the heart of his rationale for upholding the law’s individual mandate.

In Friday’s opinion, U.S. District Judge Reed O'Connor ruled that last year's tax cut bill knocked the constitutional foundation from under the law by eliminating the penalty under the individual mandate for not having coverage. The rest of the law cannot be separated from that provision and is therefore invalid, he wrote.

Supporters of the law immediately said they would appeal. "Today's misguided ruling will not deter us: our coalition will continue to fight in court for the health and well-being of all Americans," said California Attorney General Xavier Becerra, who is leading a coalition of states defending the ACA.

The White House applauded O'Connor's ruling, but said the law remains in place while appeals proceed.

Congress is unlikely to act while the case remains in the courts. Numerous high-ranking Republican lawmakers have said they did not intend to also strike down popular provisions such as protection for people with pre-existing medical conditions when they repealed the ACA's fines for people who can afford coverage but remain uninsured.

Still, Democratic Rep. Nancy Pelosi, who is expected to become House speaker in January, vowed to fight what she called an "absurd ruling." She said the House "will move swiftly to formally intervene in the appeals process to uphold the life-saving protections for people with pre-existing conditions and reject Republicans' effort to destroy the Affordable Care Act."

White House Press Secretary Sarah Huckabee Sanders said: "We expect this ruling will be appealed to the Supreme Court. Pending the appeal process, the law remains in place."

This would put Roberts in a potentially awkward spot. As a Wall Street Journal editorial noted Monday, Roberts saved the law in 2012 by describing the mandate penalty as a tax – something Congress has unquestioned authority to impose. But with that “tax” – or penalty – having been removed starting next year, Republicans challenging the law in this case argued the program is now illegal.

“We'll admit to a certain satisfaction in seeing the Chief Justice hoist on his own logic,” the Journal editorial said.

But the same editorial noted that more is at stake than simply the tax question, while predicting the ruling would be overturned on appeal in the end.

“The Affordable Care Act has also been up and running since 2014, which means so-called reliance interests come into play when considering a precedent. Millions of people now rely on ObamaCare's subsidies and rules, which argues against judges repealing the law by fiat,” the editorial board said. “In any case, the Supreme Court's ‘severability’ doctrine calls for restraint in declaring an entire law illegal merely because one part of it is. Our guess is that even the right-leaning Fifth Circuit Court of Appeals judges will overturn Judge O'Connor on this point.”

Fox News’ Alex Pappas and The Associated Press contributed to this report.