The President of the state Senate has filed a change to a bill that would strip power from the attorney general and give the governor exclusive authority to represent the state in many legal matters.

On Wednesday morning, attorney general Andy Beshear called the measure “an unprecedented power grab and one of the worst constitutional overreaches since the adoption of our current constitution.”

“The attorney general is not the governor’s lawyer, he’s not the General Assembly’s’ lawyer, he is the people’s lawyer,” Beshear said. “Because, as the Supreme Court explained, in Kentucky, the people are the sovereign, the people are the king. Not the government and not the governor.”

Beshear said the proposal amounted to a “get-out-of-jail-free card” for the governor.

AG Beshear testifying against bill that would strip powers from his office #kyga17 pic.twitter.com/Q9sByuc85d — Ryland Barton (@RylandKY) March 8, 2017

The move comes after nearly a year of legal challenges brought on by Beshear, a Democrat, in which he sued Republican Gov. Matt Bevin for unilaterally making budget cuts and overhauling the University of Louisville board of trustees.

Bevin has in turn accused Beshear of inadequately defending the state’s new law requiring to perform and describe ultrasounds on women seeking abortions.

The proposal came as a surprise substitute to House Bill 281 that deals with making transparent the contracts the attorney general makes with outside law firms.

The attorney general would still have authority over habeas corpus proceedings, medical fraud, public service commission appeals and consumer protections.

Senate president Robert Stivers, the sponsor of the measure, said the legislature has “the ability to limit everybody’s power and authority.”

“I disagree with the Supreme Court because the constitution is the constitution,” Stivers said. “And it says clearly that the legislature has the authority to prescribe the duties of the attorney general.”

Kentucky has a Republican governor and Republican supermajorities in both chambers of the legislature. Beshear and Secretary of State Alison Lundergan Grimes are the only statewide Democratic elected officials.

Stivers dismissed the notion that his proposal was politically motivated.

“Go back and look at my history, starting with Ben Chandler, going though Greg Stumbo and Jack Conway that I have complained that attorney generals have overreached their authority,” Stivers said.

Former Democratic Attorney General Jack Conway refused to defend the state’s constitutional ban on same-sex marriage after it was overturned by a federal court.

Former Democratic Attorney General Greg Stumbo sued former Republican Gov. Ernie Fletcher for alleged violations of the state merit system and appointing too many Republicans to state university boards.

The Senate Judiciary Committee did not vote on the measure Wednesday morning, but committee chair Whitney Westerfield said they might take it up soon.

After the hearing, Westerfield, who lost a close race to Beshear in 2015 for attorney general, Tweeted several comments that the proposal wasn’t a shoe-in.

“Dem spin in full effect this AM. We heard testimony & I may not call it for a vote. It could change based on input. That’s the process,” Westerfield wrote.

The General Assembly has four more working days during this year’s legislative session.