After a seismic political shift in Virginia's top elected offices, the new attorney general has concluded that the state's ban on gay marriage is unconstitutional and he will no longer defend it in a federal lawsuit, his office said Thursday.

Virginia, widely considered a battleground state in the nationwide fight to grant same-sex couples the right to wed, will instead side with plaintiffs who are seeking to have the ban struck down, a spokesman for Attorney General Mark Herring said in an email to The Associated Press.

"After a thorough legal review of the matter, Attorney General Herring has concluded that Virginia's current ban is in violation of the U.S. Constitution and he will not defend it," spokesman Michael Kelly wrote.

"We want to be sure that whatever happens next will result in a quick, clear and final decision affirming the freedom to marry for our clients and for all Virginians," said Claire Guthrie Gastañaga, executive director of the American Civil Liberties Union of Virginia.

Herring, a Democrat who campaigned supporting gay marriage, planned to file a brief Thursday morning with the federal court in Norfolk, where a suit against the ban is being heard, as notification of the state's change in position in the case, Kelly said.

The shift comes on the heels of court rulings in which federal judges struck down gay-marriage bans in Utah and Oklahoma.

The Virginia lawsuit says the state's ban violates the U.S. Constitution's equal-protection and due-process clauses.

With the election of Democrats Terry McAuliffe as governor and Herring as attorney general, Virginia made a sharp turn away from the socially conservative officeholders they succeeded, particularly Republican Attorney General Ken Cuccinelli, an activist on social issues such as abortion and gay marriage. McAuliffe issued an executive order on inauguration day prohibiting discrimination against state employees who are gay.

Virginia voters approved the same-sex marriage ban 57 percent to 43 percent in 2006. But a Quinnipiac University poll in July 2013 found that 50 percent of registered Virginia voters supported same-sex marriage while 43 percent opposed it. (The survey's margin of error was plus or minus 3 percentage points.)

Proponents of striking down the state's 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.

The legal costs in the Norfolk case are being paid by the American Foundation for Equal Rights, which was behind the effort to overturn California's gay-marriage ban.

David Boies and Theodore B. Olson, the high-profile legal duo who brought down the California ban, lead the legal team in the Norfolk case. 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 had said.

The Norfolk lawsuit's plaintiffs are two couples: Timothy Bostic and Tony London and Carol Schall and Mary Townley. Bostic and London applied for a marriage license from the Norfolk Circuit Court clerk's office in July, but their application was denied.

Schall and Townley were married in California in 2008. They have a daughter, whom Schall gave birth to in 1998, but Townley can't adopt her because Virginia law doesn't allow same-sex couples to adopt children, according to the lawsuit.

The lawsuit argues that Virginia law stigmatizes gay men and lesbians, along with their children and families, because it denies them the same definition of marriage afforded to opposite-sex couples.

In the state's General Assembly, Democratic legislators are far outnumbered in the House of Delegates, but the victory of pro-gay-marriage candidate Jennifer Wexton this week won the Senate for the Democrats, according to Washington-area LGBT newspaper Metro Weekly. Virginia Democrats took immediate aim at the state's ban on gay marriage, but a proposed constitutional amendment to reverse it faces a long road. The earliest voters could see the issue on the ballot is 2016.

Al Jazeera and The Associated Press