A U.S. appeals court handed President Barack Obama another victory for his signature healthcare law Thursday, rejecting challenges by the state of Virginia and others seeking to invalidate the law as unconstitutional.

The U.S. Court of Appeals for the Fourth Circuit overturned a lower court judge who had ruled the federal government could not compel people to buy health insurance or face paying a penalty, known as the individual mandate and a critical part of Obama's avowed effort to cut healthcare costs.

It was the second major victory at the appellate level for the White House over an issue that will likely be taken up by the U.S. Supreme Court in its 2011-12 term, which begins next month.

Virginia had contended this provision conflicted with a state statute, giving it standing to challenge the federal law. But the appeals court found Virginia did not have the right to challenge it.

A day after Congress passed the federal healthcare overhaul in March 2010, Virginia signed into law a measure to shield its residents from the law. The appeals court said that was a ''smokescreen'' to try to trump the federal government's authority but that effort had failed.

``If we were to adopt Virginia's standing theory, each state could become a roving constitutional watchdog of sorts; no issue, no matter how generalized or quintessentially political, would fall beyond a state's power to litigate in federal court,'' the appeals court ruled in a unanimous decision.

The judges said they could not rule on whether the mandate, due to take effect in 2014, was constitutional but noted its importance and signaled apparent frustration that Virginia's lack of standing prevented them from deciding the merits of the issue.

``The significance of the questions at issue here only heightens the importance of waiting for an appropriate case to reach the merits. This is not such a case,'' they wrote.

In a separate ruling, the appeals court ordered another lawsuit against the healthcare law, which targeted the penalty imposed for those who do not purchase insurance, be dismissed because the penalty had yet to be imposed.

In that ruling, two of the judges, appointed to the bench by Obama, said they would have found the law constitutional had they been able to rule on the merits of the case.

``I would hold that the challenged provisions of the Act are a proper exercise of Congress' authority under the Commerce Clause to regulate the interstate markets for health services and health insurance,'' wrote Judge Andre Davis.

FOCUS ON SUPREME COURT

While the rulings are important, they likely mean the attention will zero in on other rulings where the merits of the case were addressed. One in the 11th Circuit Court of Appeals rejected the individual mandate as unconstitutional while another, in the 6th Circuit, found it was legal.

``Since there are already conflicting views from appellate courts (the 11th and 6th) we believe the Supreme Court is likely to hear an appeal,'' Wells Fargo Securities senior analyst Peter Costa said in a note to clients.

Obama, a Democrat, pressed for the law to be passed to help stem the soaring costs of healthcare services and provide coverage to the more than 30 million uninsured Americans, but rival Republicans have pushed to undo it in the courts, in state legislatures and in the U.S. Congress.

White House adviser Stephanie Cutter called the ruling another victory for the healthcare reform act and predicted the administration would prevail in court in the end.

Healthcare is already a major theme in the run-up to the November 2012 elections for president and Congress.

In late June, the U.S. Court of Appeals for the Sixth Circuit in Cincinnati upheld the individual mandate by ruling that Congress had the power to require Americans to buy health insurance.

That contrasts with a ruling by the 11th Circuit in Atlanta in August against the individual mandate requirement in a challenge brought by 26 states that sued to block the law directly rather than pass their own statutes to do so.

In that case, the court overturned a decision that rejected the entire healthcare law.

The attorney general for Virginia, Ken Cuccinelli, said he would appeal, arguing the state was within its rights to pass a law to insulate its citizens from the federal law.

``Health, safety and welfare issues have long been recognized as being part of the powers reserved to the states by the Constitution,'' Cuccinelli said in a statement. (Additional reporting by James Vicini and Lisa Lambert in Washington, and by Jonathan Stempel and Lewis Krauskopf in New York; Editing by Tim Dobbyn and Howard Goller)