About 60 lawyers in Cleveland hammered out a last-minute settlement on the eve of the first jury trial over the opioid crisis, arriving bleary-eyed on what would have been opening statements on Monday.

“It was a late night,” said Paul Hanly of New York’s Simmons Hanly Conroy, outside the courtroom after the judge dismissed the case on Monday morning in light of the settlement. He negotiated the deal with Joe Rice, of Motley Rice, and Paul Farrell of Greene Ketchum, Farrell, Bailey & Tweel in Huntington, West Virginia. All three are co-lead counsel of the multidistrict litigation over the opioid crisis.