Following a seismic political shift in Virginia's top elected offices, the new attorney general has said  the state's ban on gay marriage is unconstitutional and he will no longer defend it in federal lawsuits, 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 the 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.

Herring, who campaigned in part on marriage equality, planned to file a brief Thursday morning with the federal court in Norfolk, where one of the lawsuits is being heard, as notification of the state's change in position in the case, Kelly said.

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

The lawsuits in Virginia, one filed in Norfolk and one in Harrisonburg, say the state's ban violates the Constitution's equal protection and due process clauses. The American Civil Liberties Union and Lambda Legal are representing the plaintiffs

With the election of Gov. Terry McAuliffe and Herring as attorney general, Virginia made a hairpin 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 found that 50 percent of registered Virginia voters support same-sex marriage, while 43 percent oppose it. The survey's margin of error was plus or minus 3.1 percentage points.