In a major victory for the Obama administration, the Supreme Court ruled Thursday that the 6.4 million people who receive health insurance through the federal government’s exchange are still legally eligible for tax subsidies to help pay for the insurance, in effect saving the law. Chief Justice John Roberts wrote the opinion for the four Democratic-appointed justices and Justice Anthony Kennedy, saying the Obama administration’s interpretation of the Affordable Care Act was lawful, in a 6-3 ruling.

President Barack Obama staked his legacy on a law that has already insured an additional 16.5 million people in only five years. For the second time in three years, the Supreme Court legitimized the Affordable Care Act. It ensured the stability of the law for the time being and thwarted the dearest wishes of its opponents. King v. Burwell, the case decided today, concerned one of the most important portions of the law, the financial assistance that made it possible for millions of Americans to purchase a plan on the individual insurance market. The court rejected the challenger’s views on grounds that accepted the administration’s reasoning.

Close video Senator: SCOTUS ruling on health care law is ‘a great victory’ for Americans Sen. Richard Blumenthal joins José Díaz-Balart to react to the Affordable Care Act ruling and says the Supreme Court’s decision Thursday is a “great victory.” Sen. Richard Blumenthal joins José Díaz-Balart to react to the Affordable Care Act ruling and says the Supreme Court’s decision Thursday is a “great victory.” share tweet email Embed

Shortly after the ruling came down, Obama declared that his signature health care law is “here to stay.”

“The point is, this is not an abstract thing anymore,” Obama said from the White House’s Rose Garden. “This is not a set of political talking points. This is reality. We can see how it is working. This law is working exactly as its supposed to. In many ways, this law is working better than we expected it to.”

At issue in the case was whether federal subsidies to purchase health insurance were available in states that did not set up their own marketplaces, but relied on federally-facilitated ones. The plaintiffs, four people who did not want to purchase health insurance, claimed that the IRS had unlawfully made subsidies available to them. Roberts wrote that their interpretation of the wording of the law – specifically the words “established by the state” – made no sense. “The whole point of that provision is to create a federal fallback in case a State chooses not to establish its own Exchange. Contrary to petitioners’ argument, Congress did not believe it was offering States a deal they would not refuse—it expressly addressed what would happen if a State did refuse the deal,” Roberts wrote in his opinion.

Justices Antonin Scalia, Clarence Thomas and Samuel Alito dissented. Writing on their behalf, Scalia accused the majority of acting in bad faith just to save the law. “So it rewrites the law to make tax credits available everywhere. We should start calling this law SCOTUScare,” Scalia wrote in the dissent. He said Roberts’ reasoning was an act of “interpretive jiggery-pokery.”

RELATED: Scalia responds to Obamacare ruling in blaze of fury

In total, 6.4 million people would have faced skyrocketing premiums if the Supreme Court had ruled that four words in the text of the law made federal financial aid illegal. Thirty-four states chose not to set up exchanges, for logistical or political reasons.

The case originated at a conference hosted by the conservative American Enterprise Institute in 2010. The leading lights of the right gathered to figure out how to undermine the recently passed Affordable Care Act. “The bastard has to be killed as a matter of political hygiene,” said Michael Greve of the American Enterprise Institute at the event. “I do not care how this is done, whether it’s dismembered, whether we drive a stake through its heart, whether we tar and feather it and drive it out of town, or if we strangle it. I don’t care who does it, whether it’s some court someplace or the United States Congress, any which way, any dollar spent on that goal is worth spending.”

Close video Gwen Jackson, ACA subsidy recipient: Affordable care ‘is for everybody’ Gwen Jackson speaks to the media on Thursday after the Supreme Court ruled to preserve insurance subsidies for millions. “We are thankful today,” Jackson said. Gwen Jackson speaks to the media on Thursday after the Supreme Court ruled to preserve insurance subsidies for millions. “We are thankful today,” Jackson said. share tweet email Embed

The Obama administration argued that it makes no sense to read the law out of context as the plaintiffs have, and that even if it’s ambiguous, the court’s precedent is to defer to a federal agency on what a law means. The 4th Circuit Court of Appeals found that the wording of the law was “ambiguous and subject to multiple interpretations” but said that the administration had the authority to interpret the law as it did.

Many legal observers thought the case was straightforwardly against the plaintiffs, but defenders of the Affordable Care Act were spooked when at least four justices of the Supreme Court opted to hear the case despite the lack of a split in the federal appeals court — usual grounds for taking a case.

Poll: SCOTUS ruling on ACA