In the last hours of session Friday morning, state lawmakers voted to give legislative leaders equal standing with the Attorney General to intervene in constitutional challenges to state laws.

The provision, hastily attached to a health care transparency bill in House Rules committee late Thursday night, says:

"The Speaker of the House of Representatives and the President Pro Tempore of the Senate, as agents of the State, shall jointly have standing to intervene on behalf of the General Assembly as a party in any judicial proceeding challenging a North Carolina statute or provision of the North Carolina Constitution."

"These two gentlemen, if they act together, are agents of the state," said Rep. Skip Stam, R-Wake. "So if the state has a right to intervene, they would have the right to intervene."

That prompted Rep. Rick Glazier, D-Cumberland, to ask whether Stam was seeking to take away the authority of the Attorney General, which is a constitutional office.

"No," Stam replied, saying the Attorney General would retain all his current powers. "Intervention is an additional party."

Stam said the intervention would be at the court's discretion, subject to Rule 24 of the Federal Rules Civil Procedure, which allows intervention:

(2) By a Government Officer or Agency. On timely motion, the court may permit a federal or state governmental officer or agency to intervene if a party's claim or defense is based on: (A) a statute or executive order administered by the officer or agency; or (B) any regulation, order, requirement, or agreement issued or made under the statute or executive order.

When the constitutionality of a state law is challenged, it is the Attorney General's role to defend the state law. But Attorney General Roy Cooper, a Democrat, has been critical of some legislation passed this session, particularly the abortion restriction bill.

The change appears to set up a scenario in which Republican legislative leaders could take a position contrary to the Attorney General in a court case on that law or any other.

The Pro Tem and Speaker could also step in to defend a law if the Attorney General should decide not to do so.

In several other states, most recently Pennsylvania and New Mexico, Attorneys General have refused to defend their state's bans on same-sex marriage on constitutional grounds. North Carolina's same-sex ban has been targeted for a similar challenge.

The measure passed the House and Senate early Friday morning. The House vote was along party lines.

Senate Bill 473 is on its way to Governor Pat McCrory, who will have thirty days to decide whether to approve it.