RICHMOND, Va. (AP) - Same-sex couples have the same right to marry as interracial heterosexual couples, Virginia’s attorney general said Friday in papers urging an appellate court to uphold a judge’s ruling that the state’s gay marriage ban is unconstitutional.

Attorney General Mark Herring is backing two same-sex couples who filed a lawsuit challenging state laws and a constitutional provision barring gay marriage in Virginia and denying recognition of such unions performed in other states. U.S. District Judge Arenda Wright Allen in Norfolk struck down the laws in February but put the ruling on hold while it is appealed.

A three-judge panel of the 4th U.S. Circuit Court of Appeals will hear arguments May 13.

Lawyers for both sides expect the issue to ultimately be decided by the U.S. Supreme Court, either in the Virginia case or one from another state. Since the Supreme Court ruled last year that a law prohibiting the federal government from recognizing same-sex marriages was unconstitutional, federal judges have struck down state bans in Michigan, Oklahoma, Utah, Virginia and Texas. A judge in Kentucky has ordered the state to recognize same-sex marriages performed in other states, and a judge in Ohio has said he will do the same. Several other lawsuits have been filed.

Herring said in a brief filed with the appeals court that Allen was correct in citing the Supreme Court’s 1967 Loving v. Virginia decision, which invalidated state interracial marriage bans, as a basis for striking down a prohibition against same-sex marriage. He said the U.S. Constitution’s equal protection clause guards the fundamental right to marry and trumps the states’ authority to decide the issue.

Lawyers for two circuit court clerks defending the ban have said in court papers that same-sex marriage is not a fundamental right because it was never contemplated by the framers of the equal protection clause, but Herring said that argument is unpersuasive.

“Loving teaches that the Fourteenth Amendment protects the fundamental right to marry, even if the way in which it is practiced would have surprised the Framers or made them feel uncomfortable,” he wrote.

Herring also urged the court to dismiss claims that legalization of gay marriage would open the door to polygamy and unions between close relatives.

“The clerk’s slippery-slope arguments are the same ones used to oppose interracial marriage in 1967; they are no more persuasive today than then,” he wrote.

One of the clerks has argued in court papers that Virginia’s laws encourage procreation and stable families with children raised by both mothers and fathers, which are legitimate government interests. Herring called that argument irrational and “outright demeaning” not only to gay couples, but also to straight couples who are infertile or elderly or simply do not want to have children.

Attorneys for the same-sex couples made arguments similar to Herring’s in a separate brief filed a few hours later, emphasizing their view that the state’s ban violates the equal protection clause.

“Virginia’s Marriage Prohibition is antithetical to the Nation’s most elemental principles of equality,” they wrote. “It creates a permanent ‘underclass’ of gay and lesbian Virginians who are denied the fundamental right to marry available to all other Virginians simply because their relationships are deemed inferior, morally flawed, or religiously unacceptable.”

The lawsuit was filed by Timothy Bostic and Tony London of Norfolk, who were denied a marriage license by Norfolk Circuit Court Clerk George E. Schaefer III’s office, and Carol Schall and Mary Townley of Chesterfield County, whose 2008 marriage in California is not recognized in Virginia.

Prince William County Circuit Court Clerk Michele McQuigg intervened as a defendant because the outcome affects clerks throughout the state.

Two other same-sex couples who filed a similar lawsuit in Harrisonburg also have been allowed to intervene in the case before the appeals court.

At least 17 states and the District of Columbia have state laws or court decisions that allow same-sex couples to marry.