FRANKFORT, Ky. - The Kentucky Supreme Court unanimously denied Attorney General Andy Beshear's petition to rehear an opioid contract case. 

Attorney General Andy Beshear filed a petition for a rehearing with the high court after it sided with the Finance and Administration Cabinet in August that the Cabinet had the final say in approving outside contracts.

The case surrounds a contract Beshear entered into with Morgan & Morgan in September 2017 to investigate violations of state law dealing with manufacturing, distribution and dispensing of opioids. The Finance Cabinet rejected the contact and canceled the contract.

Beshear filed a suit in Franklin Circuit Court arguing his office was exempt from review by the Finance and Administration Cabinet and Government Contract Review Committee and sought a permanent injunction preventing the Legislative Research Commission and the Finance Cabinet from interfering with the contract with Morgan & Morgan.

While the lower courts agreed with Beshear, the Supreme Court ultimately determined the authority to enter into contingency-fee based contracts with outside companies is subject to overriding authority by the General Assembly.

Beshear said it was crucial to have the case reheard so he could continue his action against opioid companies.

“All we are asking is they look at the arguments that go directly to these contracts, under the contracts you the taxpayers don’t owe a dime to pursue these cases they cost millions of dollars,” Beshear said in a social media video in September. “I hope is the Supreme Court will relook at these specific arguments so we have the tools to hold these companies accountable.”

The Bevin Administration maintains the decision is the correct one.

"This decision does not prohibit the Attorney General from obtaining outside legal representation in cases against opioid manufacturers, but it requires him to do so legally," said Bevin Communications Director Elizabeth Kuhn in a statement. "The people of Kentucky should be the primary beneficiaries of any opioid settlements, not Andy Beshear's friends and donors with huge contingency fee contracts. The Supreme Court's denial of a rehearing today shows that the Court is firm in its position that the Attorney General is not above the law and must comply with it just like every other state agency."

Morgan & Morgan are big donors to Democratic candidates in Kentucky.

Beshear's office says despite the ruling they will continue to fight opioid companies.

“Matt Bevin continues to fight for the opioid companies and against Attorney General Beshear’s attempts to hold them accountable. Matt Bevin has always opposed these lawsuits, which he admitted on CNBC, including opposing General Beshear’s lawsuit against Johnson & Johnson, a company that Oklahoma won a $572 million verdict against," Kenneth Mansfield, Deputy Communications Director for Beshear's Office said in a statement. "While Matt Bevin tells AARP that these companies get a ‘bad rap,’ General Beshear works to hold them accountable.”