The Supreme Court upheld Obamacare's insurance subsidies as legal in a 6-3 ruling Thursday morning.

"Congress passed the Affordable Care Act to improve health insurance markets, not to destroy them," Chief Justice John Roberts wrote in the court's opinion.

The decision means that the Affordable Care Act stands unchanged and that the government can continue subsidizing coverage for millions of Americans.

What did the Supreme Court rule?

The Supreme Court found that the Affordable Care Act expressly meant for all 50 state insurance marketplaces to work identically, regardless of whether they were run by a state or the federal government. Roberts wrote for the majority that "state exchanges and federal exchanges are equivalent — they must meet the same requirements, perform the same functions, and serve the same purposes."

Obamacare challengers had argued that the language of the law restricted the subsidies to only state-established marketplaces. But the Supreme Court strongly rejected that argument. Roberts wrote that the subsidies are so critical to how the health law works, its impossible to imagine a plausible world where Congress restricted some states' access.

"It is implausible that Congress meant the Act to operate in this manner," Roberts wrote.

He later continued that "Those credits are necessary for the Federal Exchanges to function like their State Exchange counterparts, and to avoid the type of calamitous result that Congress plainly meant to avoid."