The Supreme Court ruled 7-2 on Thursday against Texas and other Republican-led states attempting to crush Obamacare in the nation’s highest court in the latest test of the law.

The court overturned an appeal court ruling that overturned the law’s individual mandate provision. Chief Justice John Roberts and Conservative Justices Clarence Thomas, Brett Kavanaugh and Amy Coney Barrett endorsed Judge Stephen Breyer, as did Sonia Sotomayor and Elena Kagan.

Breyer said Texas and the other states that challenged the law hadn’t shown it did them harm.

“Neither the individual plaintiffs nor the prosecutors have shown that the injury they suffer or will have suffered is’ largely due to the ‘alleged unlawful conduct’ they complain about,” wrote Breyer.

The decision is a huge victory for the law that former President Barack Obama signed in 2010. Since then, the law has become a crucial element of the country’s health system, responsible for caring for tens of millions of Americans.

President Joe Biden, who served as Obama’s vice-president when the law was signed, hailed Thursday’s ruling as a “great victory” for millions of Americans who, amid the Covid pandemic, risk losing their health care if the law is repealed .

Biden pledged to expand Obamacare, a key promise in his presidential campaign.

“After more than a decade of attacks on the Affordable Care Act by Congress and the courts, it is time to move forward with and on today’s decision – the third major challenge to the law rejected by the US Supreme Court building groundbreaking law, ”Biden said in a statement.

The ruling marks the third time Obamacare, officially known as the Affordable Care Act, has survived a Supreme Court appeal. Defenders of the law feared the panel, which now has a 6-3 majority of Republican-appointed judges, would overturn the long-criticized law.

“Every time, in every arena, the Affordable Care Act has prevailed,” said Senate Majority Leader Chuck Schumer, DN.Y., minutes after the Senate verdict.

“Let me definitely say, the Affordable Care Act won, the Supreme Court ruled, the ACA is here to stay. And now we’re going to try to make it bigger and better,” said Schumer.

“What a day,” he added.

Kavanaugh and Barrett were appointed by former President Donald Trump, whose administration tried unsuccessfully to overthrow Obamacare during his tenure. However, under the 2017 Tax Act, Congress effectively abolished Obamacare’s so-called individual mandate penalties by reducing them to $ 0.

Texas and more than a dozen other Republican-led states then filed lawsuits, arguing that this change in law made it unconstitutional. The Supreme Court had previously confirmed the Congressional mandate to tax, but the GOP-led states argued that if the penalty was not in place, the tax reason would no longer be valid.

These states, backed by Trump’s Justice Department, argued that the entire Affordable Care Act should be deleted if the individual mandate provision was found to be illegal.

The case went through the federal district court and the U.S. Fifth District Court of Appeals, which agreed the single mandate was unconstitutional. But 20 Democrat-led states, led by California, urged the Supreme Court to overturn the appeals court ruling, arguing that with the mandate reduced to zero, Americans would have a choice of whether or not to take out insurance.

The Supreme Court agreed to hear the case in March 2020.

A Trump spokeswoman did not immediately respond to CNBC’s request to comment on the court’s ruling.

The Democrats had warned at Barrett’s confirmation hearings that they would likely vote on the case that put Obamacare at risk.

Judges Samuel Alito and Neil Gorsuch, both Conservatives, disagreed with the court’s majority opinion.

“Today’s decision is the third part of our epic Affordable Care Act trilogy and follows the same pattern as parts one and two,” wrote Alito in a dissent that Gorsuch joined. “In all three episodes in which the Affordable Care Act was exposed to serious threats, the court delivered an unlikely rescue.”

Numerous officials in the Biden administration were quick to celebrate the decision.

White House Chief of Staff Ron Klain tweeted, “It’s still a BFD” – an obvious reference to Biden’s infamous hot-mic comment when he signed the bill in 2010 when he whispered to Obama, “This is a big one F —- – Deal. “

“Today is a good day,” tweeted Sabrina Singh, deputy spokeswoman for Vice President Kamala Harris.

White House communications officer Karine Jean-Pierre noted that the verdict was the third time Obamacare survived a challenge in the High Court.