Johnson & Johnson (J&J) has agreed to pay up to $230m to settle the opioid-related case with the New York State and its participating subdivisions Nassau County and Suffolk County in the US.

The case was filed by New York State attorney-general Letitia James, who claimed that J&J played a role in fuelling the opioid epidemic in the country.

As per the agreement, the payment will be made over nine years, including significant upfront payments.

The deal also involves the payment of another $30m in the first year if the state signs into law new legislation that forms an opioid settlement fund.

If the legislation becomes law, New York will be eligible to get more than $130m by February 2022.

The settlement also requires J&J and all its subsidiaries, predecessors and successors to stop the manufacture or sale of opioids in the state and exit the opioid business across the US.

It also bans J&J from promoting opioids or opioid products via sales representatives, sponsorships, financial support or any additional approaches.

Furthermore, the company must improve public access to information related to opioids and opioid products, including to patients and healthcare providers.

Attorney-general James said: “The opioid epidemic has wreaked havoc on countless communities across the New York State and the rest of the nation, leaving millions still addicted to dangerous and deadly opioids.

“Johnson & Johnson helped fuel this fire, but today they’re committing to leaving the opioid business, not only in New York but across the entire country.”

With the settlement agreement, J&J has not admitted liability or wrongdoing, the company said. Last year, the company decided to suspend all its prescription pain drugs in the US.

This settlement is in line with J&J’s previous all-in settlement agreement of $5bn to resolve opioid claims and lawsuits by states, cities, counties and tribal governments.

J&J is one of the many companies facing opioid lawsuits in the country. The other manufacturers included in the complaints are Purdue Pharma, Mallinckrodt and Teva Pharmaceuticals, among others.