CLEVELAND (AP) — The nation's three biggest drug distributors and a major drugmaker agreed to an 11th-hour, $260 million settlement Monday over the terrible toll taken by opioids in two Ohio counties, averting the first federal trial over the crisis.

The trial, involving Cleveland's Cuyahoga County and Akron's Summit County, was seen as a critical test case that could have gauged the strength of the opposing sides' arguments and prodded the industry and its foes toward a nationwide resolution of nearly all lawsuits over opioids, the scourge blamed for 400,000 U.S. deaths in the past two decades.

The agreement was struck in the middle of the night, just hours before a jury that was selected last week was scheduled to hear opening arguments in federal court in Cleveland.

Drug distributors AmerisourceBergen, Cardinal Health and McKesson will pay a combined $215 million, said Hunter Shkolnik, a lawyer for Cuyahoga County. Israeli-based drugmaker Teva will contribute $20 million in cash and $25 million worth of generic Suboxone, a drug used to treat opioid addiction.

"People can't lose sight of the fact that the counties got a very good deal for themselves, but we also set an important national benchmark for the others," Shkolnik said.

The deal contains no admission of wrongdoing by the defendants.

Across the U.S., the pharmaceutical industry still faces more than 2,600 other lawsuits over the deadly disaster. Participants in those cases said the Ohio deal buys them time to try to work out a nationwide settlement of all claims.

It could also turn up the pressure to work out such a deal, because every partial settlement reached reduces the amount of money the companies have available to pay other plaintiffs.

The barrage of lawsuits was brought against drug manufacturers, suppliers and sellers by state and local governments, Native American tribes, hospitals and others. For nearly two years, a federal judge in Ohio has been pushing the parties toward one big settlement.

The only defendant left in the trial that had been scheduled for Monday is the drugstore chain Walgreens. The new plan is for Walgreens and other pharmacies to go to trial within six months.

The settlement enables both sides to avoid the risks and uncertainties involved in a trial: The counties immediately lock in money they can use to deal with the crisis, and the drug companies avoid a possible finding of wrongdoing and a huge jury verdict.

"There's no amount of money that's going to change the devastation and destruction that they've done to families not only all across our county but all across the country," said Travis Bornstein, who was preparing to testify in the Cleveland trial. But he said the settlement should help provide services for people who are struggling.

Bornstein said his son, Tyler, became hooked on opioids as a teenager after receiving a prescription following surgery on his arm. He died of a heroin overdose five years later, in 2014.

Better funding for treatment programs might have helped his son, who was on a waiting list when he died, Bornstein said.

Ohio in 2017 had the second-highest death rate from drug overdoses in the U.S., behind only West Virginia.

In a statement, the three major distributors said the settlement money should be used on such things as treatment, rehab and mental health services.

The settlement also means that the evidence prepared for the trial won't be fully aired.

Lawyers for the counties were preparing to show the jury a 1900 first edition of "The Wonderful Wizard of Oz," featuring the poppy fields that put Dorothy to sleep, and a 3,000-year-old Sumerian poppy jug to show that the world has long known the dangers of opioids.

Those suing the industry have accused it of aggressively marketing opioids while downplaying the risks of addiction and turning a blind eye toward suspiciously large shipments of the drugs. The industry has denied wrongdoing.

Industry CEOs and attorneys general from four states met Friday in Cleveland, where the offer on the table was a deal worth potentially $48 billion in cash and addiction-treatment drugs to settle cases nationally.

Those attorney generals reiterated Monday that they have worked out a "framework" for a settlement. They said they hope other states and local governments sign on.

But the reception wasn't promising. Ohio Attorney General Dave Yost called the idea "a pile of lumber," not a framework. And Paul Hanly, one of the lead lawyers for the local governments, said the companies should be forced to pay more.

OxyContin maker Purdue Pharma, often cast as the biggest villain in the crisis, reached a tentative settlement last month that could be worth up to $12 billion. But half the states and hundreds of local governments oppose it. It remains to be seen whether the settlement will receive the approvals it needs.

———

Mulvihill reported from Cherry Hill, New Jersey.

———

This story has been corrected to say that the tentative deal would settle only claims brought by the Ohio counties of Cuyahoga and Summit, not other lawsuits.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.