The companies had until Saturday to decide whether enough states back the $21 billion proposed settlement with McKesson Corp, AmerisourceBergen Corp and Cardinal Health Inc and a $5 billion agreement with J&J.
The distributors said 42 states, five territories and Washington, D.C., signed on to their agreement.
Alabama, Georgia, Nevada, New Mexico, Oklahoma, Washington, West Virginia are not participating in the settlement, a person familiar with the matter said. New Hampshire agreed to settle only with the distributors, while Rhode Island joined only J&J's deal, the person said.
The companies will make their first annual settlement payment into escrow on or before Sept. 30, the distributors said. The final amount will depend on several factors, including the final participation rate of states and political subdivisions, they added.
North Carolina Attorney General Josh Stein, a lead settlement negotiator, called the support level a "remarkable showing of unity and commitment across the country to address this problem."
The settlement's complex formula envisioned at least 44 states participating, but ultimately the companies got to decide whether a "critical mass" had joined and whether to finalize the deal.
Cities and counties within participating states have through Jan. 2 to join as well. Ultimately, $10.7 billion is tied to the extent localities participate.
The deal, unveiled by 14 state attorneys general on July 21, is designed to resolve more than 3,000 lawsuits accusing the distributors of ignoring red flags that pain pills were being diverted into communities for illicit uses and that J&J played down the risks of opioid addiction.
The money would fund treatment and other services.
The companies deny wrongdoing, saying the drugs were approved by the U.S. Food and Drug Administration and that responsibility for ballooning painkiller sales lies with doctors, regulators and others.
The deal is separate from a settlement resolving similar claims against OxyContin maker Purdue Pharma LP and its wealthy Sackler family owners. A bankruptcy judge on Wednesday approved that deal, which Purdue values at more than $10 billion.
(Reporting by Nate Raymond in Boston and Aishwarya Nair in Bengaluru; Editing by Richard Chang and Alistair Bell)
By Nate Raymond