The U.S. Supreme Court on Thursday upheld President Barack Obama's healthcare overhaul, rejecting a challenge to the constitutionality of the law's requirement that individuals purchase health insurance.

Chief Justice John Roberts, a conservative, joined the four liberal justices in the 5-4 ruling.

But he differed with the rest of the majority in his reasons for upholding the individual mandate, which is the most controversial part of the law.

Justices Stephen Breyer, Ruth Bader Ginsburg, Sonia Sotomayor and Elena Kagan concluded the federal government has the right to impose the mandate under the Constitution's commerce clause.

Roberts, however, said the commerce clause is not applicable, arguing instead that the proposed penalty for people who don't purchase insurance is a tax and, as such, permissible.

The decision represents a political victory for the Obama administration.

Besides upholding the individual mandate, the court majority let stand another provision of the Affordable Care Act that expands Medicaid coverage, though the justices limited the federal government's ability to penalize states for failing to implement the expansion.

Florida and 25 other states challenged ObamaCare in court almost immediately after it became law, calling the individual mandate unconstitutional.

Republican House Speaker John Boehner reacted with disappointment to the Supreme Court decision.

"Today's ruling underscores the urgency of repealing this harmful law in its entirety," he said in a statement. "Republicans stand ready to work with a president who will listen to the people and will not repeat the mistakes that gave our country ObamaCare."

The presumptive GOP presidential nominee, Mitt Romney, said after the high court ruling that if elected, he will repeal and replace the Affordable Care Act, even though the plan resembles the healthcare overhaul he implemented as governor of Massachusetts. EFE