Officials from several US states on Wednesday unveiled a sweeping proposed settlement under which four pharmaceutical companies accused of fueling the country's opioid epidemic would pay up to $26 billion to resolve some 4,000 claims in federal and state courts.

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, said a press release from New York Attorney General Letitia James, who was joined on a briefing by prosecutors from six other states.

The proposed settlement is the largest unveiled thus far in the multi-year effort in courts to hold the industry accountable for the opioids crisis, which has caused more than 500,000 deaths in the United States in the last 20 years.

"The numerous companies that manufactured and distributed opioids across the nation did so without regard to life or even the national crisis they were helping to fuel," James said in a statement.

"Today, we are holding these companies accountable and infusing tens of billions of dollars into communities across the nation, while taking significant steps to hold these companies accountable."

Johnson & Johnson is one of the four pharmaceutical companies involved in the massive opioids settlement Johnson & Johnson is one of the four pharmaceutical companies involved in the massive opioids settlement Photo: AFP / Mark RALSTON

Under the agreement, J&J agreed to pay up to $5 billion over nine years and to cease the sales of opioids nationwide, James said.

The three distributors will pay up to $21 billion over 18 years and agreed to set up a centralized clearinghouse to help state officials track drug shipments and better guard against suspicious orders.

The exact amount will be determined by overall participation of state and local governments, according to James' statement.

A "substantial" number of states and localities need to back the deal for it to be enacted, officials said.

Nationwide, the "substantial majority" of funds will go to opioid treatment and prevention, the press release said.

J&J confirmed the agreement and said the proposed settlement "will directly support state and local efforts to make meaningful progress in addressing the opioid crisis in the United States," said General Counsel Michael Ullmann.