A panel of judges sharply disagreed Tuesday over whether Virginia’s ban on same-sex marriage violates the Constitution, trading pointed questions at an emotional appeals court hearing that previewed the legal issues likely to eventually land at the Supreme Court.

At the hearing before the U.S. Court of Appeals for the 4th Circuit, two judges with distinctly different views dominated the questioning over whether marriage is a fundamental right, protected by the Constitution, that must be offered regardless of sexual orientation.

The three-judge panel was reviewing a February decision by a Norfolk federal district judge that Virginia’s ban — which also bars recognition of same-sex marriages performed in states where they are legal, along with any legal arrangements that resemble marriage, such as civil unions — violates guarantees of equal protection and due process.

Five lawyers took turns on the podium, but the focus was on the veteran judicial panel. The opposing viewpoints of two of the jurists suggested that the third, independent-minded Circuit Judge Henry F. Floyd, might hold the deciding vote.

A former Democratic state legislator from South Carolina, Floyd has shown a bipartisan appeal. He was nominated to the federal bench by President George W. Bush and elevated to the 4th Circuit by President Obama. He is said to be a friend of both Democratic Rep. James E. Clyburn (S.C.) and the state’s Republican senior senator, Lindsey O. Graham.

As a district judge, Floyd was perhaps best known for ruling that Bush did not have the power to detain a U.S. citizen, José Padilla, as an “enemy combatant.” The 4th Circuit later overturned the decision, but Padilla was charged in a civilian court and convicted of terrorism-related crimes.

However the panel rules — a decision could come before the end of the summer — the judges acknowledged that the work they and other appeals court judges around the country are doing is probably just teeing up the issue for the Supreme Court.

Presiding Circuit Judge Paul V. Niemeyer joked that the court was a “way station” as the issue moved up I-95 to Washington.

“Maybe we should just say, ‘We pass,’ and let the case go on,” Niemeyer said deep into more than an hour of often-heated arguments.

He clearly appeared to be on one side of the issue. He resisted the arguments of Washington lawyer Theodore B. Olson, on behalf of couples challenging the ban, that the Supreme Court has recognized marriage as a fundamental right on 14 occasions. And fundamental rights, Olson said, cannot be withheld from “one class of people” that the state creates.

Niemeyer said that the vision of marriage the justices found fundamental was the “union of a husband and wife.” The state has an interest in marriage, he said, because of the capability of heterosexual couples to produce children, something same-sex couples cannot do on their own.

“It doesn’t work biologically,” Niemeyer said.

Legally recognized same-sex unions are a “brand new” kind of relationship that states may sanction or prohibit, but they are not the same as marriage, he said.

Circuit Judge Roger L. Gregory was firmly on the other side. He continually compared the case to Loving v. Virginia, the 1967 case in which the Supreme Court struck down the state’s ban on interracial marriage.

“The essence of marriage,” Gregory told a lawyer representing the two circuit court clerks who are defending Virginia’s restrictions, “is the individual’s choice to marry the person they choose.”

The interracial couple Mildred and Richard Loving needed the landmark ruling to live openly in Virginia, Gregory said. “How long do same-sex couples have to wait?” he asked.

Floyd largely withheld his view, but his questions generally seemed to favor those seeking to overturn the restrictions. He asked, for instance, why Virginia would not recognize same-sex marriages performed in other states where they are legal.

The commonwealth is not required to recognize unions that are “inconsistent with its public policy,” said David Austin R. Nimocks, a lawyer with the conservative Alliance Defending Freedom, which is representing one of the circuit court clerks.

Niemeyer was nominated to the court in 1990 by President George H.W. Bush, and Gregory was a recess appointment by President Bill Clinton in 2000 who was subsequently nominated by President George W. Bush. Floyd was named to the district court in 2003 and elevated to the 4th Circuit in 2011.

The review makes the 4th Circuit just the second appeals court to consider whether state bans on same-sex marriage are unconstitutional since the Supreme Court handed a pair of historic victories to gay rights groups in June. (The U.S. Court of Appeals for the 10th Circuit in Denver has heard arguments about, but has not ruled on, district court rulings that struck down bans in Utah and Oklahoma.)

A divided Supreme Court allowed same-sex marriages to resume in California last year after dismissing a challenge on procedural grounds, and it struck down a part of the Defense of Marriage Act (DOMA) that prohibited the federal government from recognizing same-sex unions performed in states where they are legal. The justices did not determine whether there was a constitutional right to marriage that must include gays.

But since June, federal judges have used the court’s reasoning in the DOMA case, U.S. v. Windsor, to strike down bans in Utah, Oklahoma, Virginia, Texas and Michigan. On Tuesday, Idaho’s law became the latest to be ruled unconstitutional. Additionally, judges in Kentucky, Tennessee and Ohio have said that those states must recognize same-sex marriages performed elsewhere. And state courts in New Jersey, New Mexico and, last week, Arkansas have held that same-sex marriages must be allowed.

The Virginia case is unusual because state Attorney General Mark R. Herring (D) announced shortly after taking office this year that he agreed with the challengers that the state’s restrictions are unconstitutional.

The laws are being defended by Norfolk circuit clerk George Schaefer III, who denied a marriage license to two of the challengers, and Prince William circuit clerk Michele McQuigg, who is being represented by Nimocks’s group, which also is defending other state bans.

Like their counterparts on the 10th Circuit, the judges in Tuesday’s hearing struggled with how to decode the Supreme Court’s decision in Windsor.

On one hand, the decision said that defining marriage is a power traditionally held by the states and that the federal government cannot impose its own definition. But it also said that state restrictions must not violate constitutional protections.

Gregory pointed to language in Justice Anthony M. Kennedy’s majority opinion that talked about the humiliation felt by children in same-sex families who see the state withholding official recognition of the relationships.

“Why do you want to deny [children] all these warm and wholesome things about marriage?” he asked Nimocks. “You think the child loves these parents any less because they are same-sex parents?”

On the other side, Niemeyer mixed it up with Olson, so much that Olson had little time to speak.

Niemeyer told Olson at one point that the lawyer’s arguments for blessing same-sex unions sounded like “good policy arguments” that should be made to a legislature considering the issue.

Olson reminded him that it should not be up to a class of people to assert their rights from state to state but that it is the court’s job to “protect fundamental rights and equal protection.”

James D. Esseks, representing the American Civil Liberties Union, told the judges that there were “enormous similarities” between DOMA and the Virginia restrictions.

Virginia Solicitor General Stuart A. Raphael told the court that the reason marriage traditionally has been a union of husband and wife is because the legal rights of gays have been recognized only recently.

The lawsuit was brought on behalf of two Virginia couples. Timothy Bostic and Tony London have lived together for more than 20 years and were denied a marriage license last summer by Schaefer. Mary Townley and Carol Schall of Chesterfield County were married in California and have a teenage daughter. They want Virginia to recognize their marriage.

The argument was mostly serious, but there were unusual moments.

To emphasize his point that Virginia has always considered marriage to be between a man and a woman, but did not always discriminate against mixed mar­riages, lawyer David Oakley, representing one of the clerks, brought up the 1614 union of Pocahontas and John Rolfe.

No one challenged that wedding, Oakley said.

Jenna Portnoy and Laura Vozzella contributed to this report.