FRANKFORT- Things got heated during a Senate committee this afternoon after Attorney General Andy Beshear, D-Kentucky, came to testify against a bill.

The bill in question is Senate Bill 41, which makes changes to how contingency fees are handled. The measure would make changes to allow the Finance Secretary to control how and when lawsuits are settled. 

Supporters of the bill say this is because deals are often made in secret. The settlement with Purdue Pharma was highlighted--which was settled for millions less than it was worth.

But--Attorney General Andy Beshear says this is nothing but a power grab and attack against his office.

"This is nothing but a power grab by this governor who wants to control not only the Attorney General, but as we've seen even the judiciary," said Beshear. "Our constitution makes the Attorney General the people's lawyer. It makes him or her an  independent constitutional officer. And independently elected. Our Supreme Court has ruled in 1942, 1982, and 2016, that the Attorney General cannot be placed under control of the governor, or one of the governor's employees. It's simply unconstitutional."

Sen. Damon Thayer, R-Georgetown, asked Beshear if he would sue if this bill were to become law, and that's when things got a little tense. Thayer accused Beshear of using his testimony as a campaign speech, and then scolded Beshear while explaining his vote for the measure. 

"General Beshear, you have insulted the process of the General Assembly with your campaign staffer in the front row, recording your pre-planned campaign speech," Thayer said. "You owe this committee an apology. You are an embarrassment sir."

The bill passed out of committee on a party line vote.