RICHMOND, Va. – Almost overnight, Virginia has emerged as a critical state in the nationwide fight to grant gay men and women the right to wed.

This purple state was once perceived as unfriendly and even bordering on hostile to gay rights. That's changed after a seismic political shift in the top three elected offices, where conservative Republicans have been replaced by liberal Democrats who support gay marriage.

Two federal lawsuits challenging the state's constitutional ban on gay marriage are moving forward, and a hearing on one of the cases is scheduled for Jan. 30.

Virginia's new mood

After recent court gains in Utah and Oklahoma, gay rights advocates are heartened by the new mood in Virginia. Symbolically as well, they say, the challenges to the state's gay marriage ban resonate because of the state's history of erecting a wall between church and state and a landmark U.S. Supreme Court decision involving a ­Virginia couple and a past taboo: interracial marriage.

With the election of Gov. Terry McAuliffe and Attorney General Mark Herring, the state made a hairpin turn away from the socially conservative officeholders they succeeded, particularly GOP Attorney General Ken Cuccinelli.

Democratic legislators, still widely outnumbered in the House of Delegates, have also been emboldened by the shift away from a reliably conservative state. They took immediate aim at the state's ban on gay marriage, but proposed constitutional amendments face a long road. The earliest voters could see a proposed ­amendment would be in 2016.

The separate lawsuits intended to topple the constitutional ban on gay rights have been filed in federal courts, which typically are speedy in Virginia. The issue could ­ultimately be appealed to the U.S. Supreme Court.

One lawsuit, filed in U.S. District Court in Harrisonburg, involves two couples from the Shenandoah Valley who claim that the state's ban on gay marriage violates the Constitution's equal protection and due process clauses. The American Civil Liberties Union and Lambda Legal are representing the plaintiffs.

The other lawsuit was filed in U.S. District Court in Norfolk on similar constitutional claims. The legal costs in that case are being paid for by the American Foundation for Equal Rights, which was behind the effort that overturned California's gay marriage ban.

David Boies and Theodore Olson, the high-profile legal tandem that brought down California's prohibition on same-sex marriage, lead the legal team in that challenge. Both cited Virginia's history when they announced their challenge.

"This case is about state laws that violate personal freedoms, are unnecessary government intrusions, and cause serious harm to loving gay and lesbian couples," Olson said. "As a Virginian and a conservative, I believe these laws stand against the very principles of our nation's founding."