The US Supreme Court has upheld the nationwide tax subsidies under President Barack Obama's healthcare overhaul in a ruling that preserves health insurance for millions of Americans.
The justices said in a 6-3 ruling that the subsidies that 8.7 million people currently receive to make insurance affordable do not depend on where they live under the 2010 healthcare law.
The outcome is the second major victory for Mr Obama in politically charged Supreme Court tests of his most significant domestic achievement.
Chief Justice John Roberts again voted with his liberal colleagues in support of the law. He was also the key vote to uphold the law in 2012.
Mr Obama greeted news of the decision by declaring the healthcare law "is here to stay".
He said the law is no longer about politics but the benefits millions of people are receiving.
The 2010 law, called the Affordable Care Act, prevents insurers from denying coverage because of "pre-existing" health conditions. It requires almost everyone in the US to be insured and provides financial help to consumers who otherwise would spend too much on their health insurance payments.
The United States is the only major world economy that does not have a comprehensive state healthcare system.
While the court's ruling was an important victory for Mr Obama and Democrats, it could also be useful for Republicans as the 2016 presidential and congressional elections heat up. It takes them off the hook, to a degree, from needing to draw up an alternative to Obamacare. It also leaves them with the issue to hammer home with their base of support where the law is unpopular.
Nationally, 10.2 million people have signed up for health insurance under the Obama health overhaul. That includes the 8.7 million people who are receiving an average subsidy of 272 dollars (£172) a month to help cover their insurance costs.
Of those receiving subsidies, 6.4 million people were at risk of losing that aid because they live in states that did not set up their own health insurance exchanges.
The challenge was devised by die-hard opponents of the healthcare law, often derided by critics as Obamacare.
The law's opponents argued that the vast majority of people who now get help paying for their insurance coverage are ineligible for their federal tax credits. That is because roughly three dozen states opted against creating their own health insurance marketplaces, or exchanges, and instead rely on a federal platform to help people find coverage if they do not get insurance through their jobs or the government.
The Obama administration, congressional Democrats and 22 states responded that it would make no sense to construct the law the way its opponents suggested. The idea behind the law's structure was to decrease the number of uninsured. The point of the subsidies is to keep enough people in the pool of insured to avoid triggering a so-called death spiral of declining enrolment, a growing proportion of less healthy people and payment increases by insurers.
Several portions of the law indicate that consumers can claim tax credits no matter where they live. No member of Congress said that subsidies would be limited, and several states said in a separate brief to the court that they had no inkling they had to set up their own exchange for their residents to get tax credits.
The 2012 challenge took place in the midst of Mr Obama's re-election campaign, when he touted the largest expansion of the social safety net since the advent of a national social insurance programme for the elderly nearly a half-century earlier. But at the time, the benefits of the Affordable Care Act were mostly in the future. Many of its provisions had yet to take effect.
In 2015, the landscape has changed, although the partisan and ideological divisions remain for a law that passed Congress in 2010 with no Republican votes.