The three largest U.S. drug distributors and drugmaker Johnson & Johnson have agreed to finalize a proposed $26 billion settlement resolving claims by states and local governments that they helped fuel the U.S. opioid epidemic.

Distributors McKesson Corp, AmerisourceBergen Corp and Cardinal Health Inc along with J&J had until Friday to decide whether enough cities and counties nationally had opted to join the landmark settlement to justify moving forward with it.

The deal aims to resolve around 3,000 lawsuits by state and local governments seeking to hold the companies responsible for an opioid abuse crisis that has led to hundreds of thousands of overdose deaths in the United States over the last two decades.

The distributors and J&J in separate statements on Friday confirmed they had determined there was “sufficient” participation to move forward with the settlement, which was first announced in July. They are not admitting wrongdoing.

The announcement paves the way for the companies to begin making payments to the governments in April, money that officials say will be used to fund treatment and other programs aimed at addressing the health crisis.

“Because of the money, there will be people alive next year who otherwise would have died,” North Carolina Attorney General Josh Stein, a lead settlement negotiator, said in an interview.

The lawsuits accuse the distributors of lax controls that allowed massive amounts of addictive painkillers to be diverted into illegal channels, and that drugmakers, including J&J, downplayed the risk of addiction when marketing the pain medicines.

The proposed settlement calls for the distributors to pay up to $21 billion over 18 years and for J&J to pay up to $5 billion over nine years. About $2.3 billion is set aside to cover fees and expenses of plaintiffs’ lawyers and state attorneys general.

“Billions of dollars are now going to flow to treatment, recovery, education and abating this public health crisis,” said Paul Geller, a lawyer for local governments at Robbins Geller Rudman & Dowd.

Most states are settling.

All four companies continue to face claims in Alabama, Oklahoma, Washington and West Virginia, while New Hampshire did not settle with J&J. The companies recently also agreed to settle with Native American tribes.

Peter Mougey, a plaintiffs’ lawyer at the law firm Levin Papantonio involved in the negotiations, said over 7,000 local governments opted into the settlement. “Almost 40 states are 99 percent or higher,” he said of participation within the states.

It is likely the biggest, though not the last, settlement to result from opioid litigation.

This month, the Sackler family owners of OxyContin maker Purdue Pharma in its bankruptcy proposed a revised settlement worth up to $6 billion that would resolve claims the company fueled the epidemic. Drugmaker Mallinckrodt this month won bankruptcy court approval for a $1.7 billion settlement.

Other drugmakers like Israel-based Teva Pharmaceutical Industries Ltd TEVA.TA as well as major pharmacy chains remain in litigation. Talks with those companies are ongoing, Stein said.

(Reporting by Nate Raymond in Boston and Manas Mishra in Bengaluru; Editing by Noeleen Walder and Bill Berkrot)