The U.S. Supreme Court on Thursday sided with the White House in a ruling that will continue making health insurance affordable for millions of Americans, while ensuring a signature legislative achievement for President Obama remains in place.

In a 6-3 vote, the justices ruled that federal tax subsidies should continue to be made available to everyone under the Affordable Care Act, often called “Obamacare.”

That means tax credits would not only go to consumers living in states with their own health insurance exchanges, but also to those living in states without such “marketplaces” where people must rely on health insurance administered by the federal government.

The challenge was the latest to the Affordable Care Act, but Thursday’s ruling by the high court means the law “is here to stay,” President Obama said in a news conference where he called the ruling “a victory for hard-working Americans.”

“If the partisan challenge to this law had succeeded, millions would have had thousands of dollars worth of tax credits taken from them. For many, insurance would have become unaffordable again. Many would have become uninsured again,” Obama said. “Ultimately, everyone’s premiums could have gone up. America would have gone backwards. That’s not what we do. That’s not what America does. We move forward.”

Advocacy groups hailed the Court’s decision.

“As a result, these patients can continue to focus on their healing and recovery, instead of worrying about losing their coverage and care,” said Nancy Brown, CEO of the American Heart Association, said in a joint statement with the American Cancer Society, American Cancer Society Cancer Action Network, American Diabetes Association and National Multiple Sclerosis Society.

“Now that the Affordable Care Act has survived two major Supreme Court challenges, it’s time for our nation to concentrate on improving the law and enrolling as many uninsured Americans as possible so everyone can receive the quality health and preventive care they need,” Brown said.

In 2010, Congress passed the Affordable Care Act, a law requiring that everyone in the nation be insured, if they have access to affordable coverage.

The case the court ruled on Thursday, known as King v. Burwell, centers on a specific element of the law involving states that failed to participate.

By law, each state was given the option to establish an insurance exchange, or marketplace, where residents could compare various health plans. Qualified low-income residents could receive federal tax subsidies to help pay for their health plans.

Some states set up their own exchanges, but 34 states – about two-third of the nation –declined to. Across the nation, about 85 percent of people using the exchanges qualify for subsidies to help pay for coverage, based on their income.

About 10.2 million people signed up for health insurance through the health insurance exchanges established under the Affordable Care Act as of March.

The average subsidy, which is based on an individual’s income, was about $272 per month.

The subsidies received by residents in those states were the main focus of the Supreme Court case because ACA opponents argued the law only allows people in marketplaces run entirely by a state to get federal tax credit.

“Congress passed the Affordable Care Act to improve health insurance markets, not to destroy them. If at all possible we must interpret the Act in a way that is consistent with the former, and avoids the latter,” Chief Justice John G. Roberts Jr. wrote in the majority opinion.

He was joined by Justices Anthony Kennedy, Ruth Bader Ginsburg, Stephen Breyer, Sonia Sotomayor and Elena Kagan. Those opposing the decision were Justices Antonin Scalia, Clarence Thomas and Samuel Alito.

“We should start calling this law SCOTUScare,” Alito wrote in the dissent, referring to the previous cases in which the high court upheld the law.

“The cases will publish forever the discouraging truth that the Supreme Court of the United States favors some laws over others, and is prepared to do whatever it takes to uphold and assist its favorites,” he said.

But Cyndi Zagieboylo, president and CEO of the National Multiple Sclerosis Society, said the decision may help improve, and possibly save, the lives for low-income patients living with heart disease, diabetes and other chronic illnesses.

“The uninsured are more likely to suffer serious complications or die from conditions such as MS, cancer, diabetes, heart disease and stroke than are people with health insurance,” she said. “Being uninsured with a serious chronic disease can also result in more expensive care, a greater risk of personal bankruptcy and higher health care costs system wide.”

The coalition of patient organizations submitted a friend-of-the-court brief in January urging the court to keep the ACA intact.

The group cited numerous scientific studies that detailed significant health risks associated with being uninsured. Among them:

  • Patients without insurance are more likely to be diagnosed with advanced-stage cancers that are more difficult to treat.
  • Patients with heart disease have higher mortality rates due to poorer management of high blood pressure than those with insurance.
  • Stroke patients without insurance have greater neurological impairments, longer hospital stays, and up to a 56 percent higher risk of premature death than insured patients.
  • Patients without health insurance are twice as likely to have a diabetic complication as patients with insurance.