The Appeals Court for the 11th Circuit, based in Atlanta, found that Congress exceeded its authority by requiring Americans to buy coverage, but also reversed a lower court decision that threw out the entire healthcare law.
The legality of the individual mandate, a cornerstone of the healthcare law, is widely expected to be decided by the U.S. Supreme Court. Opponents have argued that without the mandate, which goes into effect in 2014, the entire law falls.
The law, adopted by Congress in 2010 after a bruising battle, is expected to be a major political issue in the 2012 elections as Obama seeks another term in office and as all the major Republican presidential candidates have opposed it.
Obama has championed the individual mandate as a major accomplishment of his presidency and as a way to try to slow the soaring costs of healthcare while expanding coverage to the more than 30 million Americans without it.
The White House said it strongly disagreed with the ruling and voiced confidence the decision would not stand.
"Today's ruling is one of many decisions on the Affordable Care Act that we will see in the weeks and months ahead. In the end, we are confident the Act will ultimately be upheld as constitutional," Obama aide Stephanie Cutter said in a statement.
The Supreme Court is expected to take up the healthcare law during its upcoming term that begins in October with a ruling possible by the summer of 2012, just a few months before Obama faces re-election.
Twenty-six states had challenged the mandate, arguing that Congress had exceeded its authority by imposing such a requirement, but the Obama administration had argued it was legal under the Commerce Clause of the U.S. Constitution.
A divided three-judge panel of the appeals court found that it did not pass muster under that clause or under the Congress' power to tax. The administration has said the penalty for not buying healthcare coverage is akin to a tax.
"This economic mandate represents a wholly novel and potentially unbounded assertion of congressional authority: the ability to compel Americans to purchase an expensive health insurance product they have elected not to buy, and to make them re-purchase that insurance product every month for their entire lives," the majority said in its opinion.
That opinion was jointly written by Judges Joel Dubina, who was appointed to the appeals court by Republican President George H.W. Bush, and by Frank Hull, who was appointed by President Bill Clinton, a Democrat.
Republicans have sought to undercut or repeal the healthcare law at every level of government -- in federal court, in the state legislatures and in the U.S. Congress.
The decision contrasts with one by the U.S. Appeals Court for the 6th Circuit, based in Cincinnati, which had upheld the individual mandate as constitutional. That case has already been appealed to the Supreme Court.
The Court of Appeals for the 4th Circuit, based in Richmond, has yet to rule on a separate challenge by the state of Virginia. A federal judge in that state had ruled the mandate unconstitutional as well.
The state of Florida had led the 26 states to challenge the insurance requirement, winning a ruling by a federal judge in Florida that the entire law was unconstitutional.
"Today we have prevailed in preventing Congress from infringing on the individual liberty protected by the U.S. Constitution," Florida Attorney General Pam Bondi said.
However, the 11th Circuit did not agree that the entire Obama healthcare law should be tossed out. Many provisions are already being implemented, including allowing children to stay on their parents' health insurance plan until age 26 and banning lifetime coverage limits.
Further, the Obama administration Friday issued new incentives for states and people to participate in health insurance exchanges, including tax credits and funding grants for the states.
The Obama administration did win some support from the appeals court for the individual mandate. One of the three judges, Stanley Marcus, dissented from the majority opinion.
The majority "has ignored the undeniable fact that Congress' commerce power has grown exponentially over the past two centuries and is now generally accepted as having afforded Congress the authority to create rules regulating large areas of our national economy," wrote Marcus, also a Clinton appointee to the appeals court.