Four major pharmaceutical companies agreed to a multimillion-dollar payout over the US opioid epidemic on Monday, hours before a landmark federal trial in which they were facing accusations of a conspiracy to profit from addiction and death.

Teva Pharmaceuticals, the largest manufacturer of generic drugs in the world, and three drug distributors, among the biggest corporations in America, are to pay a total of $260m to settle the first of thousands of lawsuits by communities across the US which accuse the industry of creating an epidemic that that has claimed more than 400,000 lives over the past two decades.

Monday’s trial in Ohio was intended to help establish whether opioid makers, drug distributors and pharmacy chains are liable to pay out billions to more than 2,700 cities, counties and Native American tribes.

Other trials are scheduled in the coming months if a comprehensive deal involving all parties is not reached. Talks over a total payout of about $50bn stalled on Friday but lawyers said Monday’s settlement may provide a path to an agreement.

The Ohio lawsuit was brought by two counties, Cuyahoga and Summit, using anti-racketeering laws, originally written to go after organised crime. The counties claimed that manufacturers of narcotic painkillers aggressively drove up sales with knowingly false claims that they were less addictive and more effective than they were, leading to a huge surge in prescribing and addiction.

The question is how much is enough? This is not enough. Armond Budish

They also alleged that distributors and pharmacies ignored legal obligations to restrict delivery and dispensing of the drugs, even as the death toll escalated, because they were making so much money.

Eileen Shapiro, the Summit county executive, said the lawsuit was intended to prevent drug companies flooding the area with opioids which “devastated” communities and created a surge in illegal opioids led by heroin and fentanyl.

“We started this originally to stop the behaviours,” she said. “Enough is enough.”

The two counties were suing for a total of $7bn. Armond Budish, the Cuyahoga executive, said $260m would only go so far in dealing with the consequences of the epidemic.

“The question is how much is enough? This is not enough,” he said.

But he said it will provide some relief in offsetting the cost of treatment, the huge burden of overdoses on the emergency services and providing social care.

“Helping families deal with the results,” he said. “Helping kids basically left as orphans by this crisis.”

Among the companies that agreed to payout on Monday were the distributors McKesson and AmerisourceBergen, both among the top 10 revenue-generating companies in the US. The Walgreens pharmacy chain did not settle. Its case will be joined with other pharmacies, including Walmart and CVS, at a separate trial.

In the weeks leading up to the trial several opioid makers reached settlements, including Johnson & Johnson which lost a major trial in Oklahoma in August when a judge found the company’s drive to sell opioids with false claims caused addiction and death.

Opioid makers and distributors have paid out hundreds of millions of dollars to settle federal cases accusing them of failing to obey laws about cutting off opioid deliveries to pharmacies dispensing suspiciously large amounts of prescription painkillers. But the firms made no admission of liability.

Lawyers believe the industry is keen to avoid trials which will expose internal decision-making around the marketing, sale and delivery of opioids, and how much executives ignored evidence of rising addiction from prescription painkillers.

“We now know from discovery in this case how this industry worked,” said one of the plaintiff’s attorneys, Joe Rice.

Rice and other lawyers say they will not permit drug companies to use settlements to prevent evidence of their responsibility for the epidemic from being made public. They say the release of documents will be a condition of any comprehensive agreement.

They’re getting away with murder. They’re buying their way out. They think that’s the way of doing business Emily Walden, Fed Up

That will be welcomed by activists who want to see the drug industry exposed.

Emily Walden, chair of the Fed Up coalition of families and doctors, said she wants to see the prosecution of executives responsible for marketing and other strategies that boosted opioid sales.

“It’s pretty clear what happened and what they’ve done,” she said. “We need some accountability and it needs to lead to criminal charges. They’re getting away with murder. They’re buying their way out. They think that’s the way of doing business.”

Walden also said the proposed $50bn comprehensive settlement falls far short of what is needed. A new study has found that the epidemic has cost more than $800bn in the last four years. The Society of Actuaries said costs ranged from increased health and social care spending to loss of earnings by people who have died and pressure on the criminal justice system.

“We need hundreds of billions of dollars to deal with this crisis,” said Walden. “The settlement talks are not holding these companies accountable for what they’ve done. $50bn is pocket change to them.”

There have been some criminal prosecutions.

In July federal prosecutors charged three top executives of the drug distributor Miami-Luken with illegally flooding parts of Appalachia with millions of opioid pills. In May, John Kapoor, the 75-year-old billionaire founder of Insys Therapeutics, was convicted for bribing doctors to prescribe a powerful opioid, Subsys, to patients who did not need it.

Purdue Pharma, the maker of the powerful opioid OxyContin, which played a leading part in firing up the epidemic, is negotiating to end hundreds of lawsuits. The company has filed for bankruptcy as part of a proposed agreement that would see it put into a trust and future profits go toward alleviating the epidemic. Members of the Sackler family who own the company would also pay from the personal fortunes they have built from the sale of OxyContin.

But the deal is opposed by several state attorneys general who want to see the company out of business and the Sacklers, who are estimated to have made more than $12bn from opioids, pay more money.