Despite some close calls, the Utah Legislature on Wednesday overrode vetoes by Gov. Gary Herbert that grew out of a yearlong turf war where part-time lawmakers contend the full-time governor is seizing too much of their power.

And Paul Edwards, spokesman for the governor, said he hopes for an opportunity soon to test the constitutionality of the disputed new laws in court.

One bill resurrected and passed is HB198, which spells out procedures to force the Utah Attorney General to provide the Legislature written legal opinions when requested, as already required by law.

Herbert blocked one such opinion last year by saying it would violate his attorney-client privilege with the A.G.’s office.

The bill barely achieved the needed two-thirds majority in the Senate on a 20-8 vote — after legislators held the voting open for five minutes to wait for Sen. Margaret Dayton to return and cast the last vote needed for passage. The measure easily passed the House 63-7.

Also passing was SB171, which now will allow legislators to intervene in court to defend the laws they pass — instead of depending on the attorney general’s office to do so.

It passed with a vote to spare in the Senate, 21-7, and cleared the House 55-15.

Edwards said, “Clearly the governor and the Legislature disagree about the appropriate roles and functions of their respective branches of state government. We would encourage the Legislature to intervene in a court case as soon as possible so that the Utah courts can quickly resolve these important constitutional issues.”

The Legislature also overrode a line-item veto by Herbert of $700,000 from a budget bill to implement SB171, funding three lawyers, a paralegal and a legal secretary.

Herbert complains that SB171 could create separate — and possibly conflicting — state positions on lawsuits challenging state law if both the attorney general and lawyers for the Legislature are involved.

Several legislators argued that would not be bad. Sen. Stuart Adams, a Layton Republican who sponsored SB171, pointed out cases where state attorneys general had declined to defend a law passed by the Legislature.

“I don’t believe this is an overreach,” Adams said. “It actually is trying to stand up for what is constitutional and what we ought to be able to do to defend ourselves.”

(Francisco Kjolseth | The Salt Lake Tribune) Sen. Stuart Adams, R-Layton, Senate sponsor of SB171, speaks on the bill, which now will allow legislators to intervene in court to defend the laws they pass instead of depending on the attorney general's office to do so.

“It comes down to a simple thing of checks and balances,” said Sen. Lyle Hillyard, R-Logan.

Debate in the Senate focused on whether the Legislature was expanding its power. The majority decided it wasn’t, but Democrats and two Republicans questioned the need to override the veto.

“What if [the Legislature believes] the Department of Commerce doesn’t do their job good enough?” asked Sen. Todd Weiler, a Woods Cross Republican who voted for the bill when it passed last month but voted against overriding the veto.

What about the Utah Highway Patrol? he asked. “Are we setting a precedent now where we’re going to go out in the future where we say we need to hire our own police officers?”

Utah Attorney General Sean Reyes issued a statement later in the day questioning whether the Legislature’s action had thrown the balance of powers into turmoil.

“We believe in a carefully balanced democratic system of government where the legislature enacts laws, the executive branch enforces them, and courts interpret them. When one branch upsets that equilibrium, it threatens the harmony and integrity of the whole and erodes public confidence in the institutions.”

For his part, Reyes said his office will continue on as before.

“We will continue to do our duty and defend state laws, unless and until there is a decision from the courts requiring us to do otherwise.”

Tussles between the legislative and executive branches began a year ago, when Herbert refused requests to call the Legislature into a special session to set rules for a special congressional election after then-Rep. Jason Chaffetz announced that he would resign. Instead, Herbert set rules for the election himself.

The Legislature requested an opinion from Reyes about the legality of that move. His office prepared the opinion, but Reyes refused to release it when Herbert said doing so would violate his attorney-client privilege — because others in the attorney general’s office had already provided legal advice for him on the issue.

Herbert said the attorney general — or even different arms within his office — should not advise opposing parties on the same issue.

“That is a misreading of the law,” said Rep. Merrill Nelson, R-Grantsville, sponsor of HB198, who argued that the state constitution makes the attorney general the legal counsel for all state officials, including the Legislature.

(Francisco Kjolseth | The Salt Lake Tribune) Rep. Merrill Nelson, R-Grantsville, sponsor of HB198, resurrects procedures to force the Utah Attorney General to provide the Legislature written legal opinions when requested, as already required by law. The Legislature called itself into special session on Wednesday, April 18, 2018, to attempt to override Gov. Gary Herbert's vetoes of two bills.

Nelson said the new law sets procedures to avoid possible conflicts of interest, including using separate lawyers in that office to provide opinions to the separate clients. If the A.G. refuses to provide an opinion to legislators, they could file suit directly with the Utah Supreme Court to force the matter.

As part of the turf war, the Legislature also earlier passed HJR18 — a constitutional amendment that, if approved by voters, would allow the Legislature to call itself into special session. That is a power it has now, but only to attempt to override vetoes. Because HJR18 is a proposed constitutional amendment, Herbert could not veto it and it will go directly to voters Nov. 6.

Brigham Young University political science professor Adam Brown has noted that the Legislature has overridden vetoes only five times in the past 20 years.

The last time was 2011, when the Legislature overrode two vetoes by Herbert. One was a bill that returned state agencies to a five-day workweek instead of four days. The other increased the amount of sales tax that funds transportation.