When Oklahoma settled a landmark lawsuit against drugmaker Purdue Pharma in March, the state and some of its cities looked on with irritation as nearly $200 million went to a new addiction treatment and research center at Oklahoma State University.

The state, which Attorney General Mike Hunter (R) was elected to represent, got nothing in the $270 million deal. Oklahoma’s more than 670 cities and counties, which have absorbed most of the emergency and health-care costs of the opioid epidemic, received just $12.5 million to divvy up. The agreement gave about $60 million to private lawyers hired to work on the case.

Two months later, Hunter announced an $85 million settlement with a second defendant, Teva Pharmaceutical. Oklahoma’s governor, lawmakers and mayors were not about to make the same mistake twice.

State legislators and the governor, who enacted a law two days before the Teva announcement to require that all settlement money go into the state treasury, went to court last week to ensure the law is followed. Nine cities, including the state’s largest, Oklahoma City, asked four days later to intervene in the case so they might have a say in how dollars are spent to address the drug crisis.

Looming over the quarrel is a potentially much bigger payday in the state’s ongoing court battle with the last remaining defendant, Johnson & Johnson. Oklahoma is suing the health-care conglomerate for its alleged role in the epidemic, seeking billions of dollars to address future damage from the drug crisis.

A trial in that case is in its fourth week in Cleveland County District Judge Thad Balkman’s courtroom in Norman, Okla. If it results in a settlement or a verdict for the state, all sides will want a piece of a possibly enormous payment and some voice in how the money is spent on the drug crisis.

In the meantime, the conflict over how to spend the money already available is providing a sideshow to the main event.

Cities and counties “need a seat at the table and need to be involved in the decisions to abate the opioid crisis,” said Matt Sill, an attorney for the nine cities that asked Balkman to allow them to intervene in the settlement discussions last week.

The office of Gov. Kevin Stitt (R) declined to comment, and Oklahoma House Speaker Charles McCall (R) and Senate President Greg Treat (R) did not return telephone calls seeking comment.

But an official familiar with their position said they were alarmed when one of Hunter’s attorneys suggested at a court hearing June 10 that, despite the new state law, the Teva settlement money should be placed in an escrow account under Balkman’s control until Oklahoma knows how much money it might win from Johnson & Johnson.

That lawyer, Michael Burrage, also said he does not think the new law applies to cases such as the current one, which seek funds to abate the “public nuisance” allegedly created by drug companies that sent large amounts of addictive narcotics into communities.

A Teva representative said the company is ready to pay the money.

Typically, public-nuisance laws have been used to close a neighborhood crack house or take on a factory that pollutes a public waterway. Johnson & Johnson is arguing in court that the state cannot apply the law to drug companies’ legal and regulated activities, nor force them to pay to abate them.

The Oklahoma case is the first of nearly 50 state lawsuits against pharmaceutical companies to proceed to trial. It is being closely watched by others that have made the same public-nuisance argument, as well as 1,900 cities, counties, Native American tribes and others whose lawsuits have been combined into one huge case in federal court in Ohio.

In the federal case, the plaintiffs have proposed a novel strategy that could make every town, city and county in the United States eligible to share in any settlement with the pharmaceutical companies that have been sued. U.S. District Judge Dan Polster of Ohio will consider the idea next week.

Asked for comment on the current conflict, Hunter issued a statement that said, in part: “We are in constructive consultation with state leaders. All three branches of state government are committed to working together. Our goals are aligned and we want to do what is in the best interest of the state.”

Hunter has argued, however, that the Purdue case had to be settled quickly because of fears the company might declare bankruptcy, leaving Oklahoma with nothing, and that the company insisted the money go toward a national center on addiction treatment and research.

Advocates watching the wave of opioid litigation are concerned, however, that if settlement money is deposited in state bank accounts without restrictions, nothing will prevent lawmakers from allocating it for roads, law enforcement or other needs unrelated to the drug crisis. One study showed that just a tiny portion of the $246 billion settlement reached between states and tobacco companies in 1998 was spent to prevent addiction to tobacco and to help people quit.

The Teva settlement has not been made public, leaving municipalities unsure about how they might acquire a piece of it. After the Purdue settlement, Sill’s law firm put out a news release noting that one of his clients, Comanche County, would receive just $18,545.99 of the $12.5 million allocated toward local needs.

Another question Oklahoma cities are asking the court is whether the drug companies’ settlements with the state ended the lawsuits filed by cities and counties. The cities and Hunter contend the agreement does not preclude each city from suing; Purdue argues that the deal applied to all lawsuits filed by any government in Oklahoma.

This week, Balkman appointed a special master, Steven W. Taylor, a former chief justice of the Oklahoma Supreme Court, to handle the dispute over the Teva settlement.