The Supreme Court ruled Thursday against Texas and other Republican-run states trying to knock Obamacare down in the latest test of the law in the nation’s highest court.

The Supreme Court voted 7-2 to overturn an appeal court ruling that overturned the individual mandate provision of the law.

Judge Stephen Breyer, who drafted the court’s opinion, said Texas and the other states that challenged the law have failed to show that it caused them harm. The states have not legally proven their position.

“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 was Obama’s vice president when the law was signed, has promised to expand his reach.

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 recent Senate decision.

“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.

Several conservatives in the court, including presiding judge John Roberts, joined Breyer’s opinion on Thursday. The others who voted with Breyer were Judges Clarence Thomas, Sonia Sotomayor, Elena Kagan, Brett Kavanaugh, and Amy Coney Barrett.

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 mandate under the tax authority of Congress, 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.”

The White House did not immediately respond to CNBC’s request to comment on the ruling. But numerous Biden administration officials quickly celebrated the decision on Thursday morning on social media.

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 said the ruling marks the third time Obamacare has survived a appeal in the Supreme Court.