RICHMOND — A panel of three federal appeals court judges aggressively questioned attorneys in a Virginia courtroom Tuesday who argued over the constitutionality of the federal health care overhaul — appearing particularly skeptical of arguments that sought to invalidate the law.

During a hearing that lasted more than two hours, the judges — all appointed by Democratic presidents — frequently interrupted lawyers on both sides to probe their legal positions.

Both cases — brought separately by Liberty University in Lynchburg and Virginia Attorney General Ken T. Cuccinelli II (R) — argue that Congress exceeded its constitutional authority to regulate interstate commerce by requiring that individuals obtain health insurance by 2014 or pay a penalty.

Though the U.S. Court of Appeals for the 4th Circuit tends to rule in about 45 days, the judges Tuesday offered no indication of how long they would take before deciding the cases, which resulted from appeals of contradictory lower court decisions.

Federal District Court Judge Judge Norman K. Moon upheld the constitutionality of the law in a ruling on the case of Liberty, a private religious college; while in Cuccinelli’s case, Judge Henry E. Hudson found that the insurance mandate was unconstitutional.

The lawsuits are two of more than 30 filed across the country challenging the federal law. An appeals court in Atlanta is scheduled to hear oral arguments next month on a challenge filed jointly by 26 states in Florida.

Of the 14 judges on the 4th Circuit, seven were appointed by Republicans and seven by Democrats. But the panel selected by a computerized lottery to hear Tuesday’s arguments was composed of Judge Diana Gribbon Motz, appointed by President Clinton, and Judges Andre M. Davis and James A. Wynn Jr., who are President Obama’s appointees.

The judges seemed particularly dubious of Virginia’s assertion that it has legal standing to sue. A lower court judge had previously accepted Cuccinelli’s contention that Virginia has a sovereign interest in protecting a state law passed last year by the General Assembly that makes it illegal to require Virginians to be insured.

But lawyers for the Obama administration argued that the individual mandate imposes burdens on citizens, not states, and so Virginia has no legal interest in the case.

“How on earth can there be standing if all it takes to establish standing is that the state pass a law and the attorney general moves forward?” Judge Davis asked Acting Solicitor General Neal Kumar Katyal, who argued on behalf of the Obama administration.

The most high-profile legal challenges to the health care overhaul have been the two suits filed by state attorneys general. If appellate courts decide states do not have standing to sue, however, it would raise the possibility that the law’s constitutionality will be determined by the Supreme Court using one of dozens of cases filed by private institutions — like the Liberty University case — that have received less attention.

“It seems very dubious that Virginia will have any further role in this litigation,” said Walter Dellinger, a former solicitor general who is representing Congressional Democrats on the health care issue, after listening to the oral arguments.

The judges also asked probing questions of Mathew D. Staver, a lawyer for Liberty University, challenging Staver’s assertion that a citizen who goes without health insurance has chosen not to engage in economic activity.

Staver and other opponents of the law argue that it would be unprecedented for government to force individuals to buy a product — health insurance — when they have chosen to go without it. Congress’ power to regulate commerce can’t give it power to require a person to take part in commerce, they argue.

“These requirements that you think are so important, this activity, does that have a constitutional basis? What in the commerce clause would require activity?” asked Judge Motz.

“I think it’s inherent when you’re talking about regulating commerce . . . commerce cannot be idleness,” Staver responded.

Katyal countered that, in fact, an individual who goes without insurance nevertheless takes part in the commerce of the vast health care market. That’s because, even without insurance, he will ultimately consume health care services when he gets sick or is injured and shows up at the emergency room.

Those costs are then born by those who do have insurance, costing the system $43 billion a year and raising the average family’s health care premium by $1,000.

“It’s an almost universal factor of our existence,” Katyal said. “One cannot opt out of it on an individual basis.”

In a statement, White House spokeswoman Stephanie Cutter said the administration is “confident the various cases regarding the law will be decided quickly, long before the law is scheduled to be fully implemented” and said administration officials are “confident” they will prevail.

After the hearing, Cuccinelli said he believed the judges seemed receptive to Virginia’s arguments — and he looked forward to a final resolution of the case at the Supreme Court.

“We knew at the beginning of this process that we’d be going all the way through it, all three stages,” he said. “So we buckled up a little bit for the whole ride.”