Virginia Attorney General Mark Herring has announced that his office will no longer defend the state's ban on gay marriage.

“As attorney general, I cannot and will not defend laws that violate Virginians' rights,” Herring said on NPR's Morning Edition. “The commonwealth will be siding with the plaintiffs in this case and with every other Virginia couple whose right to marry is being denied.”

Herring, a Democrat, was sworn in just days ago. He succeeds Ken Cuccinelli, a Republican who made an unsuccessful bid for governor. Cuccinelli and former Republican Governor Bob McDonnell strongly defended the ban.

The case, Bostic v. Rainey, will have its first hearing next week.

“There have been times in some key landmark cases where Virginia was on the wrong side, was on the wrong side of history and on the wrong side of the law,” Herring said. “And as attorney general, I'm going to make sure that the [people] presenting the state's legal position on behalf of the people of Virginia are on the right side of history and on the right side of the law.”

Herring's decision to change the state's legal position is certain to create an uproar among conservative Republicans.

As a member of the state Senate in 2006, Herring voted against marriage equality.

“I saw very soon after that how that hurt a lot of people and it was very painful for a lot of people,” he said.

The decision carries the possibility of making the case less likely to reach the U.S. Supreme Court, which ruled last year that supporters of Proposition 8, California's former ban, did not have legal standing to defend the law.