The House of Delegates gave preliminary approval Friday to a bill allowing the legislature to hire its own lawyer to defend the Virginia Constitution if the attorney general won’t.

In a voice vote, the GOP-dominated House approved a bill that has taken on new urgency for Republicans since Attorney General Mark R. Herring (D) announced last week that he would not defend the state’s constitutional ban on same-sex marriage.

The measure is likely to pass the House easily in a final vote Monday, then move over to the Senate, where Democrats who took control of the chamber this week are expected to kill it.

Normally, the attorney general defends a state law or the constitution if it is challenged in court. But Herring said he would not defend the gay marriage ban — adopted eight years ago with the support of 57 percent of voters — because he believes that it violates the U.S. Constitution. He changed the state’s position in a pending federal court case brought by two gay couples seeking to overturn the ban, submitting a motion siding with the plaintiffs.

Republicans had been expecting such a move since Herring expressed support for same-sex marriage during last fall’s campaign to succeed former attorney general Ken Cuccinelli II (R), an opponent of gay marriage.

Virginia Attorney General Mark Herring appears at a news conference at the Capitol in Richmond, Va., on Dec. 18, 2013. (Steve Helber/AP)

Even before Herring’s move last week, Del. C. Todd Gilbert (R-Shenandoah) had proposed a bill giving the General Assembly or its individual House or Senate chambers the right to intervene with outside legal counsel when the attorney general or governor declines to defend the constitution or a state law.

The House passed the measure after a prolonged back-and-forth between Robert G. Marshall (R-Prince William) and Joseph D. Morrissey (D-Henrico).

Morrissey, who supports same-sex marriage and opposes the bill, said the legislature does not have the power to grant itself legal standing to intervene in lawsuits related to Virginia law. That’s something only the judge presiding over such a case can do, he said.

“No General Assembly can give or confer standing in federal court,” he said.

But Marshall argued that the legislation is needed to ensure that the state is adequately represented. “Who is representing Virginia now in court?” he asked.

Herring and Gov. Terry McAuliffe (D) have noted that the law is being defended by lawyers representing court clerks in Norfolk and Prince William County, who are named as defendants in the suit.

“The sponsor has admitted this bill is about opposing marriage equality at all costs, even if it raises obvious constitutional concerns about separation of powers, not to mention the limitless range of negative consequences it could have in practice,” Michael Kelly, a spokesman for Herring, said in an e-mail. “The Virginia Constitution empowers legislators to pass laws and the Attorney General to represent the state in legal proceedings. That’s the way it should stay.”