The three largest US drug distributors agreed during a trial to pay up to $1.18 billion to settle claims by New York state and two of its biggest counties over their role in the nationwide opioid epidemic, the state's attorney general said on Tuesday. McKesson Corporation, Cardinal Health and AmerisourceBergen settled as state attorneys general prepare to announce as soon as this week a landmark $26bn deal with the distributors and drugmaker Johnson & Johnson to resolve cases nationwide. The deal with New York Attorney General Letitia James and the populous Long Island counties of Nassau and Suffolk came three weeks into the first jury trial accusing companies of profiting from a flood of addictive painkillers that devastated communities. "While no amount of money will ever compensate for the millions of addictions, the hundreds of thousands of deaths, or the countless communities decimated by opioids, this money will be vital in preventing any future devastation," Ms James said. Hunter Shkolnik, a lawyer for Nassau County at the law firm Napoli Shkolnik, said in a statement that unlike the proposed national settlement, the New York deal "is not contingent on the rest of the country or other states joining". In a joint statement, the distributors called the settlement "an important step toward finalising a broad settlement with states, counties and political subdivisions". About 500,000 people died from opioid overdoses in the United States from 1999 to 2019, according to the US Centres for Disease Control and Prevention. And the crisis appeared to have worsened during the coronavirus pandemic. The CDC said last week that provisional data showed 2020 was a record year for drug overdose deaths with 93,331, up 29 per cent from a year earlier. Opioids were involved in 74.7 per cent, or 69,710, of those fatalities. Justice Jerry Garguilo, who is presiding over the trial in Central Islip, on Tuesday morning granted a request by lawyers for the state and counties to drop the distributors from the case, without discussing the terms of the deal. The New York trial will continue against three drug companies accused of deceptively marketing their painkillers – Endo International, Teva Pharmaceutical Industries and AbbVie's Allergan unit. Before the trial, Johnson & Johnson agreed to pay $263 million to resolve the claims by the state and counties. Pharmacy operators Walgreens Boots Alliance, CVS Health, Rite Aid and Walmart agreed to settle with the counties for a combined $26m. Ms James's office said that of the nearly $1.18bn the distributors agreed to pay, more than $1bn will go towards addressing the epidemic. The counties have said the money will be used for mental health and addiction programmes. Payments will start in two months and will continue over the next 17 years, Ms James said. More than 3,300 cases have been filed largely by states and local governments alleging drugmakers falsely marketed opioid painkillers as safe, and distributors and pharmacies of ignoring red flags that they were being diverted to illegal channels. The companies have denied wrongdoing, with drug distributors saying they maintained anti-diversion programmes and drugmakers noting their pain medicines had US approval and labels that warned of the known risks of opioids. Two other opioid cases are also on trial in West Virginia and California. Those cases will be decided by judges, with closing arguments in the West Virginia case expected next week.