Healthcare organizations say the court decision to uphold federal subsidies under the Affordable Care Act supports wider access to affordable health insurance.

Medical professionals across the spectrum on Thursday praised the U.S. Supreme Court decision to uphold the federal subsidies that help pay for insurance plans purchased through the Affordable Care Act.

The court, in a 6-3 ruling issued Thursday morning, stated that the intent of the law was to provide financial help across the country. The ruling came despite a sentence in the Affordable Care Act (ACA) legislation that opponents of the law said limited government assistance to states that set up their own healthcare exchanges.

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

Read More: The Pros and Cons of the Affordable Care Act »

Richard Fiesta, executive director of the Alliance for Retired Americans, told Healthline the court made the right decision.

“I think common sense prevailed,” he said.

Those between the ages of 55 and 64 who are retired and not yet eligible for Medicare are especially in need of the subsidies, Fiesta said.

“They would have very much been thrown into a tough situation,” he said.

A number of medical groups quickly praised the decision.

In a statement, the American Medical Association (AMA) said it was “relieved” the justices allowed the subsidies to continue.

“The subsidies upheld today help patients afford health insurance so they can see a doctor when they need one and not have to wait until a small health problem becomes a crisis,” wrote Dr. Steven J. Stack, president of the AMA. “The subsidies provide patients with peace of mind that they will not risk bankruptcy should they become seriously ill or injured and experience catastrophic health care costs.”

The American Academy of Pediatrics (AAP) also weighed in, saying it “stands behind” the court decision.

“Research shows that when parents are insured, children are more likely to access the care they need when they need it, and the whole family is healthier,” said Dr. Sandra Hassink, president of the AAP. “Today, the Supreme Court supported family health by ensuring that all U.S. families, no matter where they live, can access stable, affordable insurance that meets their most basic needs.”

The American Psychological Association (APA) also applauded the decision.

“Making insurance affordable makes health care more accessible,” said APA president Barry Anton, Ph.D. “Health plans in the exchanges have robust mental health and substance use benefits and help accomplish the triple aim of increasing quality, reducing cost and improving patient experience, all of which are essential to improving our nation’s health care system.”

Read More: Insurance Premiums on ACA Plans Could Rise Dramatically Next Year »

The positive response reflects concerns that had grown about what would happen to the 6.4 million Americans who have received tax credits for plans they purchased through the federal health insurance exchange.

About 85 percent of people nationwide who use the exchanges qualify for subsidies to help pay for health insurance, according to the New York Times.

Paul H. Keckley, Ph.D., managing director of the Navigant Center for Heathcare Research and Policy Analysis, told Healthline the court decision helps stabilize the health insurance markets.

A court decision striking down the subsidies would not have significantly affected the healthcare delivery services, but it could have started a “free fall” in the insurance sector, Keckley said.

He said if 6 million people lost coverage, that would have led some insurance companies to drop out of the exchange market and encouraged others to “jack up” their premiums.

That problem could have leaked over into the business sector, especially for small businesses that don’t provide health insurance. Some employees who suddenly lost coverage might look elsewhere for an employer who could provide insurance.

More importantly, Keckley said, is that the decision should allow the United States to move forward on reforming healthcare.

“It establishes the Affordable Care Act is our policy framework for the next decade, whether you like the law or not,” he said.

Keckley said the country should now focus on fixing the things in the law that aren’t working well.

“That’s the discussion we should be having,” he said.

AMA president Stack agreed.

“With this case now behind us, we hope our country can move forward and continue strengthening our nation’s healthcare system,” said Stack.

Officials at the Physicians Foundation also said there should be some focus now on fixing some of the parts of the Affordable Care Act.

“The outcome of the King v. Burwell SCOTUS decision does not change the underlying challenges that still face America’s practicing physicians and their patients,” wrote Dr. Walker Ray, president of the foundation. “America’s patients will continue to experience issues related to accessing medical care if shifting patterns in medical practice configurations and physician workforce trends continue.”

Read More: Is It True? Do Doctors Really Loathe Obamacare? »

The dispute in the King v. Burwell case was officially centered on whether the Internal Revenue Service had the authority to extend tax credited subsidies to insurance plans purchased through exchanges set up by the federal government.

When the ACA took effect in 2014, 16 states established their own marketplaces for health insurance. The other 34 states did not, partly because their leadership was opposed to the law. Residents of these states use the federal exchange on the national website to buy insurance plans.

The lawsuit found fault with that system, because the legislation says plans can be purchased on exchanges “established by the state.” The suit alleged that a national exchange did not meet that description.

If the court had struck down the subsidies, as the conservative dissenting justices Antonin Scalia, Clarence Thomas, and Samuel Alito voted to do, only plans in the 16 states with their own websites would have been eligible for tax subsidies.

Related News: This Is What Your Doctor’s Office Will Look Like in 5 Years »