NORMAN, Okla.— A judge in Oklahoma signed off on the state's $85 million settlement with Israeli-owned Teva Pharmaceuticals on Monday following a squabble among the attorney general, the Legislature and the governor over how the deal was structured.

Cleveland County District Judge Thad Balkman signed the agreement calling for the funds to be used to help abate the state's opioid crisis.

Under the deal, Teva admits to no wrongdoing and agrees to not promote opioids in Oklahoma. The company also agrees to help law enforcement investigate cases of opioid drug diversion or other criminal activity.

"The resources and terms of the agreement will help abate the ongoing crisis the state is facing, help prevent doctors and Oklahomans from being misled by marketing materials and provides law enforcement with another investigative tool to help us shut down pill mills and illicit enterprises," Oklahoma Attorney General Mike Hunter said in a statement.

A Teva spokeswoman didn't immediately respond to a request for comment on the settlement's approval.

Judge Thad Balkman speaks with attorneys during the opioid trial Monday, June 24, 2019 in Norman, Oklahoma. Sue Ogrocki / AP

Under the deal, outside attorneys hired by the state will receive almost $13 million of the settlement money. The rest of the funds will be placed in a special account in the state treasury.

Balkman said the deal also does not release Teva from any separate claims that might be brought by individual cities or counties. At least nine Oklahoma cities have separately filed claims against similar drug manufacturers, including Teva.

Gov. Kevin Stitt and legislative leaders had sought to intervene in the case, arguing the deal didn't comply with a new state law directing any settlement proceeds into the state treasury. The law was passed last month after lawmakers openly grumbled about how Attorney General Mike Hunter structured the state's $270 million settlement with Purdue Pharmaceuticals.

That deal called for nearly $200 million to go toward establishing a National Center for Addiction Studies and Treatment at Oklahoma State University in Tulsa, while $12.5 million was earmarked for local governments.

Oklahoma's public nuisance lawsuit against consumer products giant Johnson & Johnson is continuing in Cleveland County. The state's witness, Jessica Hawkins, an administrator with the Oklahoma Department of Mental Health and Substance Abuse Services, continued testifying Monday about a proposed $17.5 billion plan to abate the opioid crisis in the state over the next 30 years.