The US Supreme Court has upheld the centrepiece of President Barack Obama's signature healthcare overhaul law.
The law requires that most Americans get insurance by 2014 or pay a financial penalty.
"The Affordable Care Act's requirement that certain individuals pay a financial penalty for not obtaining health insurance may reasonably be characterised as a tax," Chief Justice John Roberts wrote for the court's majority in the opinion.
"Because the Constitution permits such a tax, it is not our role to forbid it, or to pass upon its wisdom or fairness," he concluded.
The vote was five to four.
In another part of the decision and in a blow to the White House, a different majority on the court struck down the provision of the law that requires the states to dramatically expand the Medicaid health insurance programme for the poor.
The upholding of the insurance purchase requirement, known as the "individual mandate," was a major election-year victory for Mr Obama, a historic ruling on the law that aimed to extend coverage to more than 30m uninsured Americans.
The 2010 law constituted the $2.6 trillion US healthcare system's biggest overhaul in nearly 50 years.
Critics of the law had said it meddles too much in the lives of individuals and in the business of the states, with 26 of the 50 US states and a small business trade group challenging the law in court.
The Supreme Court in March heard three days of historic arguments over the law's fate.
The court's ruling on the law could figure prominently in the run-up to the 6 November election in which Mr Obama seeks a second four-year term against Republican challenger Mitt Romney, who opposed the law.
Mr Obama said the Supreme Court's decision was a victory for the American people, and he promised to implement it and improve upon it in the future.
He said: "The highest court in the land has now spoken. We will continue to implement this law and we'll work together to improve on it where we can.
"What we won't do - what the country can't afford to do - is re-fight the political battles of two years ago or go back to the way things were. With today's announcement, it's time for us to move forward."
Mr Romney said that the US people must defeat President Obama to overturn his landmark healthcare overhaul.
He said: "This is a time of choice for the American people. If we're going get rid of Obamacare we're going to have to replace President Obama. My mission is to make sure we do exactly that."