“Inevitably no effort to restrict the rights or limit the opportunities of our fellow Americans has ever succeeded in the long term,” Virginia Attorney General Mark Herring (D) said at a news conference on July 28. (Jay Paul/Getty Images)

A federal appeals court on Monday struck down Virginia’s voter-approved ban on same-sex marriage, saying that withholding the fundamental right to marry from gay couples is a new form of “segregation” that the Constitution cannot abide.

The 2-to-1 decision by a panel of the U.S. Court of Appeals for the 4th Circuit, based in Richmond, upheld a lower court’s decision and extended an extraordinary winning streak in the federal courts for proponents of same-sex marriage.

Legal challenges to state bans filed systematically nationwide have prevailed in every test since the Supreme Court in June 2013 struck down part of the federal Defense of Marriage Act, which defined marriage as only between a man and a woman.

Two federal appeals courts have now said the bans are unconstitutional. The Supreme Court probably will have to make the final determination and could consider the issue as soon as next year.

Virginia Attorney General Mark Herring (D), who started a political uproar by saying shortly after taking office this year that he thought the state’s law was unconstitutional and would seek to overturn it, said he is proud that “the Commonwealth of Virginia is leading on one of the most important civil rights issues of our day.”

“Sometimes battles have been fought in the legislature, sometimes in the courtroom, sometimes even in the streets, but inevitably no effort to restrict the rights or limit the opportunities of our fellow Americans has ever succeeded in the long term,” he said in a news conference in Richmond.

Nonetheless, Herring said he does not favor same-sex marriages taking place in Virginia while the legal issue is ongoing. Opponents of such unions could ask the full 4th Circuit to review the panel’s decision or take the case directly to the Supreme Court. The panel’s decision does not go into effect for 21 days.

Byron Babione, senior counsel for Alliance Defending Freedom, the conservative legal organization that defended the Virginia laws, had not decided which path to take.

“Ultimately, the question whether the people are free to affirm marriage as a man-woman union will be decided by the U.S. Supreme Court,” he said in a statement.

The 4th Circuit covers Virginia, Maryland, West Virginia, North Carolina and South Carolina. Of those states, only Maryland allows same-sex couples to marry.

There are challenges in the other states, and North Carolina Attorney General Roy Cooper (D) announced after the ruling that his office will cease its “vigorous” defense of the state’s ban.

“It’s time to stop making arguments we will lose and instead move forward” to a final resolution at the Supreme Court, he said.

The appeals panel’s reasoning was in many ways the same as that of other federal courts.

“I have never seen anything like it, where an important constitutional issue has been decided again and again and again by federal courts throughout the United States in precisely the same way,” said Theodore B. Olson, a Republican former solicitor general who argued for the challengers along with Democratic lawyer David Boies.

But the use of the word “segregation” has deeper resonance in the former capital of the Confederacy, and the opinion frequently referred to Loving v. Virginia, the landmark 1967 case that struck down bans on interracial marriage.

Circuit Judges Henry F. Floyd and Roger L. Gregory said the Supreme Court has in numerous ways found that the right to marry is fundamental and that attempts by the government to restrict it must be narrowly drawn and justified by “compelling state interests.”

“Over the decades, the Supreme Court has demonstrated that the right to marry is an expansive liberty interest that may stretch to accommodate changing societal norms,” Floyd wrote.

“Civil marriage is one of the cornerstones of our way of life” and the choice of whom to marry “is an intensely personal decision that alters the course of an individual’s life,” he wrote. “Denying same-sex couples this choice prohibits them from participating fully in our society, which is precisely the type of segregation that the Fourteenth Amendment cannot countenance.”

Their colleague Paul V. Niemeyer dissented and called the ruling “fundamentally flawed.”

“It fails to take into account that the ‘marriage’ that has long been recognized by the Supreme Court as a fundamental right is distinct from the newly proposed relationship of a ‘same-sex marriage,’ ” he wrote.

Niemeyer said the case was not analogous to Loving, which held that race could not be the basis of a marriage restriction. “To stretch Loving’s holding to say that the right to marry is not limited by gender and sexual orientation is to ignore the inextricable, biological link between marriage and procreation that the Supreme Court has always recognized,” he wrote.

Niemeyer was nominated by President George H.W. Bush. Floyd was nominated to a federal district court in South Carolina by President George W. Bush and was elevated to the circuit court on the recommendation of President Obama. Gregory was nominated by President Bill Clinton and then by George W. Bush.

The case was brought by two couples. Timothy B. Bostic and Tony C. London are in a long-term relationship and were denied a marriage license in Norfolk. Carol Schall and Mary Townley were married in 2008 in California and now live with their 16-year-old daughter in Virginia, which does not recognize their union.

They won the first round of the case in a Valentine’s Day decision by District Judge Arenda L. Wright Allen. The case at the appeals court also included a separate lawsuit filed on behalf of all same-sex couples in the commonwealth.

The Virginia laws, some of the most absolute in the nation, are being defended by Norfolk Circuit Court Clerk George E. Schaefer III, who has a lawyer paid for by the state, and Prince William circuit clerk Michèle McQuigg, who is being represented by Babione’s group. The group is also defending bans in other states.

The ruling makes the 4th Circuit the second appeals court to decide that state bans are unconstitutional following the Supreme Court rulings in June 2013 in favor of gay rights groups. The U.S. Court of Appeals for the 10th Circuit, based in Denver, has struck down bans in Utah and Oklahoma.

Virginia Gov. Terry McAuliffe (D) applauded the 4th Circuit’s ruling and praised Herring for refusing to defend the ban, a move that helped define the attorney general as an advocate for Democratic causes.

“This is a historic ruling for our Commonwealth, and its effect will affirm once again that Virginia is a state that is open and welcoming to all,” McAuliffe said in a statement.

Opponents of same-sex marriage noted that 57 percent of Virginia voters supported a 2006 amendment defining marriage as between a man and a woman.

“Virginia’s laws have always rightly reflected the true and complementary nature of marriage,” said Victoria Cobb, president of the Family Foundation of Virginia. “It’s unfortunate that the court rejected the right of Virginians to define marriage consistent with their concern with what’s best for children and society as a whole.”

The Catholic bishops of the dioceses in Arlington and Richmond said that people with “same-sex attractions must be treated with respect and sensitivity,” yet these religious leaders vowed to fight what they called an “unjust ruling.”

“Marriage has survived for countless generations because it uniquely benefits the common good by recognizing the union of two different but complementary individuals — that is a man and a woman — who, by their union, may create a family,” Bishops Paul S. Loverde of Arlington and Francis X. DiLorenzo of Richmond said in a joint statement.