Updated

A federal judge ruled Thursday that Virginia's ban on same-sex marriage is unconstitutional, making it the first state in the South to have its voter-approved prohibition overturned.

U.S. District Judge Arenda Wright Allen issued a stay of her order while it is appealed, meaning that gay couples in Virginia will still not be able to marry until the case is ultimately resolved. Both sides believe the case won't be settled until the Supreme Court decides to hear it or one like it.

Allen's ruling makes Virginia the second state in the South to issue a ruling recognizing the legality of gay marriages.

A judge in Kentucky ruled Wednesday that the state must recognize same-sex marriages performed in other states. It did not rule on the constitutionality of same-sex marriages inside the state, however. The Virginia judge's ruling also follows similar decisions in Utah and Oklahoma federal courts.

The Virginia Attorney General's Office took the unusual step of not defending the law because it believes the ban violates the equal protection clause of the 14th Amendment. However, it asked for the judge to stay her order to avoid a situation like what happened in Utah after a federal judge declared that state's ban on gay marriages unconstitutional.

More than 1,000 gay and lesbian couples were married in the days after the ruling before the U.S. Supreme Court granted the state an emergency stay, halting the weddings and creating a cloud of uncertainty for the status of the married couples. Soon after, a federal judge also declared Oklahoma's ban unconstitutional. That ruling is also on hold while it is appealed.

In a movement that began with Massachusetts in 2004, 17 states and the District of Columbia now allow gay marriage, most of them clustered in the Northeast. None of them is in the old Confederacy.

The Virginia case centered on a gay Norfolk couple that were denied a marriage license by the Norfolk Circuit Court in July, shortly after the Supreme Court struck down the federal Defense of Marriage Act. A Chesterfield County couple that married in California and is raising a teenage daughter also later joined the lawsuit, seeking to have their marriage recognized in Virginia. The attorneys representing the plaintiffs are the same ones who successfully challenged California's voter-approved ban on gay marriages in court.

Opponents of the Virginia ban say the issue resonates in Virginia in particular because of a landmark 1967 U.S. Supreme Court decision involving a Virginia couple and interracial marriage.

Mildred and Richard Loving were married in Washington, D.C., and were living in Virginia when police raided their home in 1958 and charged them with violating the state's Racial Integrity law. They were convicted but prevailed before the Supreme Court.

During verbal arguments in the case, Virginia Solicitor General Stuart Raphael said that the ban on gay marriage is legally indistinguishable from the ban on same-sex marriage. He said the same arguments to defend the ban now are the same ones that were used back then, including that marriage between two people of the same sex has never been historically allowed. Raphael also said supporters have failed to prove how allowing gay marriage would make heterosexual couples less likely to marry.

In defending the law, the attorney for the Norfolk clerk said that the issue is best left for the General Assembly and the voters to decide.

Nationwide, there are more than a dozen states with federal lawsuits challenging state bans on same-sex marriage.