Four large drug companies reached a last-minute $260 million legal settlement over their role in the U.S. opioid addiction epidemic, averting the first federal trial that was scheduled to start Monday morning in Cleveland.

The settlement covers drug distributors AmerisourceBergen Corp, Cardinal Health Inc and McKesson Corp and Israel-based drugmaker Teva Pharmaceutical Industries Ltd TEVA, and ends lawsuits by two Ohio counties.

Hunter Shklonik, an attorney for the counties, said Teva is paying $20 million in cash and will contribute $25 million worth of Suboxone, an opioid addiction treatment.

On Friday, talks with the same defendants collapsed, which were aimed at reaching a broader $48 billion settlement covering thousands of lawsuits filed by counties, towns and states from across the country over the crisis.

The judge overseeing Monday’s trial said he would work out a new trial date for the remaining defendant, pharmacy chain operator Walgreens Boots Alliance Inc.

Reuters (Reporting by Tom Hals in Wilmington, Delaware, Nate Raymond in Boston and Kathy Gray in Cleveland.; Editing by Noeleen Walder, Bill Berkrot and Chizu Nomiyama)