California Attorney General Rob Bonta announced a $26 billion settlement with Johnson & Johnson, among other companies, over opioids.

The settlement includes Johnson & Johnson, who manufactured and marketed opioids, along with pharmaceutical distributors Cardinal, McKesson and AmerisourceBergen.

According to a news release, the settlement resolves investigations and litigation over the companies’ roles in creating and fueling the opioid epidemic while requiring significant industry changes to prevent such a crisis from repeating itself.

“Nothing can undo the devastating loss of life caused by the opioid epidemic, or stop the grief it has caused for its victims and their families, but this proposed settlement represents one step in the process of healing our communities,” Bonta said in the release. “Along with our coalition partners, our office has worked to hold accountable bad actors who fueled this public health crisis – including those who produced, distributed, and marketed these dangerous drugs. While today’s proposed settlement is a step in the right direction, we’ll continue to work to bring more much-needed relief to families throughout California whose lives have been upended by the opioid crisis.”

Under the settlement, the three pharmaceutical distributors would collectively pay up to $21 billion over 18 years, while J&J would pay up to $5 billion over nine years with up to $3.7 billion to be paid over the first three years. The total funding distributed will be determined by the overall degree of participation by litigating and non-litigating state and local governments.

The substantial majority of the funds collected through the settlement is earmarked for opioid treatment and prevention, with each state’s share of the funding determined by agreement among the states using a formula that considers the impact of the opioid epidemic on each state.

Additionally, the settlement includes injunctive relief terms that require the three distributors to, over a period of 10 years, establish a centralized independent clearinghouse to provide data and analytics about where drugs are going and how often to eliminate blind spots in the current system. The data-driven system will detect suspicious opioid orders from customer pharmacies and signs of drug diversion will result in the termination of customer pharmacies’ ability to receive shipments.

Cardinal, McKesson and Amerisource Bergen will also have to report and prohibit the shipment of suspicious opioid orders, prohibit sales staff from influencing decisions related to such orders and require senior corporate officials to engage in regular oversight of anti-diversion efforts.

The settlement also orders J&J to stop selling opioids for 10 years, while the company will not be permitted to provide grants to third parties for promoting opioids. J&J also can’t lobby on activities related to opioids or share clinical trial data under the Yale University Open Data Access Project.

Johnson & Johnson and its U.S.-based Janssen Pharmaceutical Companies finalized the settlement, confirming the contribution of up to $5 billion in a news release.

The company stated that its actions related to the marketing and promotion of prescription opioids “were appropriate and responsible,” citing that Duragesic, Nucynta and Nucynta ER accounted for less than 1% of the total opioid prescriptions in the U.S. since launch.

J&J added that the settlement is designed to resolve the majority of litigation-based claims regarding the past sales of its prescription opioid medications and the confirmation of its finalization is not an admission of any liability or wrongdoing, as the company will continue to defend against litigation that the final agreement does not resolve.

The company no longer sells prescription opioid medications in the U.S.

“We recognize the opioid crisis is a tremendously complex public health issue, and we have deep sympathy for everyone affected,” J&J EVP, general counsel Michael Ullmann said in the release. “This settlement will directly support state and local efforts to make meaningful progress in addressing the opioid crisis in the United States.”