US pharmaceutical giant Johnson & Johnson will “exit from the opioid business nationally” as part of a $230 million settlement with New York, the state’s attorney general Letitia James said Saturday.

The agreement allows Johnson & Johnson to resolve litigation over its “role in helping to fuel the opioid epidemic,” according to a statement from the prosecutor, who said the company would spread the payments over nine years.

Also read: US declares millions Johnson & Johnson vaccine doses unsuitable for use

It could also pay an additional $30 million in the first year if the state enacts new legislation creating an opioid settlement fund.

The company still faces other legal proceedings nationwide, including an ongoing trial in California.

“The opioid epidemic has wreaked havoc on countless communities across New York state and the rest of the nation, leaving millions still addicted to dangerous and deadly opioids,” James said in the statement.

“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,” she added.

That includes both manufacturing and selling opioids, the statement said.

The $230 million will be aimed at prevention, treatment and education efforts on the dangers of the substances in New York state.

Johnson & Johnson, Purdue and other pharmaceutical companies and distributors are accused of encouraging doctors to over-prescribe opioids — initially reserved for patients with particularly serious cancers — even though they knew they were highly addictive.

Since 1999, this dependence has pushed many users of the drugs to higher and higher doses and to illicit substances such as heroin or fentanyl, an extremely powerful synthetic opiate with a high risk of fatal overdose.

Also read: European agency advises against AstraZeneca usage if options available

About 500,000 people have died of drug overdoses in the United States since then.

The US Centers for Disease Control and Prevention, the country’s main public health agency, estimates that about 90,000 people died from drug overdoses in 2020, the majority of which involved opioids.