Johnson & Johnson will pay $20.4 million to settle claims by two Ohio counties, allowing the U.S. healthcare giant to avoid an upcoming federal trial seeking to hold the industry responsible for the nation’s opioid epidemic.

OxyContin manufacturer Purdue Pharma and two other drugmakers lost a bid to delay a landmark trial set for May 2019 in a multibillion-dollar lawsuit by Oklahoma’s attorney general accusing them of helping fuel an opioid abuse and overdose epidemic in the state.