Officials from several US states revealed a broad proposed settlement on Wednesday in which four pharmaceutical companies accused of driving the country’s opioid epidemic would pay up to $26 billion to settle 4,000 lawsuits in federal and state courts.

According to a press release from New York Attorney General Letitia James, who was joined on a briefing by prosecutors from six other states, under the proposed agreement, three drug distributors — McKesson, Cardinal Health, and Amerisource Bergen — along with Johnson & Johnson would pay to resolve the claims as well as finance prevention and treatment programs.

The proposed deal is the largest announced thus far in the multi-year legal effort to make the industry accountable for the opioid crisis, which has resulted in over 500,000 fatalities in the United States over the previous 20 years.

“The multiple firms that manufactured and supplied opioids across the country did so with no regard for life, let alone the national tragedy they were contributing to,” James said in a statement.

“Today, we are holding these firms accountable and reinvesting tens of billions of dollars in communities around the country, all while taking serious steps to hold these companies accountable.”

According to James, J&J agreed to pay up to $5 billion over nine years and to stop selling opioids statewide.

The three distributors agreed to pay up to $21 billion over 18 years and to establish a centralized clearinghouse to assist state agencies in tracking medicine shipments and detecting questionable transactions.

According to James’ statement, the actual sum would be determined by the overall cooperation of state and local governments.

According to officials, the agreement requires the support of a “significant” number of states and municipalities in order to be implemented.

According to the news release, the “vast majority” of funding would be directed toward opioid treatment and prevention across the country.

According to General Counsel Michael Ullmann, J&J acknowledged the deal and stated that the proposed settlement “would directly benefit state and local efforts to make substantial progress in addressing the opioid problem in the United States.”