In a surprise move, a three-judge panel of a federal appeals court based in Virginia has tossed out one of the most prominent challenges to the health reform law.

This is the first appeals court to throw out a case for lack of standing after a lower court had ruled on the merits. It leaves the Affordable Care Act with an even scorecard in the courts, with one appeals court ruling in favor of the health-care law’s constitutionality and one against it. Both cases have centered on the law’s individual mandate, which requires nearly all Americans to purchase health insurance beginning in 2014.

With two conflicting rulings on the issue, it’s widely expected that the Supreme Court will take up the case. It will likely issue a decision by next summer.

Most observers had expected the Virginia panel — all Democratic appointees, two of President Obama’s — to rule in favor of the law, supporting the mandated purchase of insurance.

Instead, the Fourth Circuit Court of Appeals said it did not have authority to rule on the case at all.

Virginia, in particular, has taken specific steps to lay the groundwork for a legal challenge to the law. After it law passed in March, 2010, Virginia passed a law barring the mandated purchase of health insurance in the state. That was meant to give the state standing in an eventual court challenge by setting up a direct conflict between state and federal law.

Thursday, the Fourth Circuit argued that such a strategy - using state laws to challenge a federal one - would not work. “To permit a state to litigate whenever it enacts a statute declaring its opposition to federal law. ..would convert the federal judiciary into a ‘forum’ for the vindication of a state’s ‘generalized grievances about the conduct of government’,” the court wrote in its decision to dismiss the Virginia case. “Under Virginia’s standing theory, a state could acquire standing to challenge any federal law merely by enacting a statute — even an utterly unenforceable one — purporting to prohibit the application of the federal law.”

One judge, in the Liberty University case, did dissent, arguing that the court should rule on the merits of the case.

A Supreme Court ruling on the Affordable Care Act became a near certainty last month, when the Eleventh Circuit Court of Appeals ruled against the health reform law. That ruling — which conflicted with the Sixth Circuit’s ruling in favor of the law — made it incredibly likely that the Supreme Court will take up the case.

The timeline still sets up a likely ruling in the spring of 2012, sometime before the Supreme Court’s term ends on June 30. An additional appellate court, in the District of Columbia, still has a health reform challenge pending. Oral arguments in the case are scheduled for Sept. 23.