RICHMOND, Va. — Gay marriage moved closer to gaining its first foothold in the South when Virginia’s attorney general said Thursday that the state’s ban on same-sex matrimony is unconstitutional and he will join the fight to get it struck down.
‘‘It’s time for the commonwealth to be on the right side of history and the right side of the law,’’ newly elected Democrat Mark R. Herring said in a state that fiercely resisted school integration and interracial marriage in the 1950s and ’60s.
Republicans accused Herring of shirking his duty to defend the state’s laws after less than two weeks on the job, while gay rights activists exulted on the latest in a string of victories — this one in a conservative and usually hostile region of the country.
‘‘It’s a nice day to be an American from Virginia,’’ Tom Shuttleworth, one of the lawyers challenging the ban, said in an e-mail.
The move reflects the rise of a new Democratic leadership in Virginia and illustrates how rapidly the political and legal landscape on gay marriage in the US is shifting.
Herring, as a state senator, supported Virginia’s 2006 voter-approved constitutional amendment defining marriage as the union of a man and woman. But he said he decided after a ‘‘thorough legal review’’ that it is unconstitutional, and he will join gay couples in two federal lawsuits challenging the ban.
‘‘I have now concluded that Virginia’s ban on marriage between same sex couples violates the Fourteenth Amendment of the US Constitution on two grounds: Marriage is a fundamental right being denied to some Virginians, and the ban unlawfully discriminates on the basis of both sexual orientation and gender,’’ he said.
A federal judge will hear arguments in one of those lawsuits next week.
Herring stressed the ban will be enforced in the meantime, which means that clerks will continue to deny marriage licenses to same-sex couples.
In a movement that began with Massachusetts in 2004, 17 states and the District of Columbia now permit gay marriage, most of them in the Northeast. None of them is in the South.
In just the past five weeks, federal judges struck down gay marriage prohibitions in deeply conservative Utah and Oklahoma, but those rulings are on hold while they are appealed.
‘‘It’s enormously powerful that Virginia is taking this position,’’ said James Esseks, of the LGBT Project for the American Civil Liberties Union. ‘‘It is a solid part of the South. This is not the Northeast. This is not California.’’
Richard Socarides, who was a senior policy adviser in the Clinton administration, called Herring’s action ‘‘a tipping point.’’
‘‘Virginia is now on the cutting edge of this,’’ he said. ‘‘I think it’s highly significant any time a state attorney general takes this position, but even more significant given the political makeup of the state is traditionally more conservative.’’