New York state has reached a $523 million settlement with drug manufacturer Teva Pharmaceuticals, closing out the state’s massive legal battle against opioid manufacturers and distributors, New York Attorney General Letitia James (D) announced on Thursday.

“We are holding Teva Pharmaceuticals accountable for its role in the opioid crisis and the irreparable harm it has done to New Yorkers, their families, and their communities,” New York Gov. Kathy Hochul (D) said in a statement. “This company misrepresented its products for decades, flooding the market with dangerous prescription drugs and endangering countless lives.”

New York state is set to receive about $313 million from Thursday’s settlement, which comes after a jury last December found Teva liable for its role in the deadly opioid crisis in New York. The state will also receive a payout of about $210 million from Teva’s $4.25 billion global settlement, reached in July.

Overall, New York has brought in more than $2 billion from its cases against opioid manufacturers and distributors, which James launched in 2019. The funds secured from the lawsuits will be set aside for addiction treatment and prevention efforts, according to the attorney general’s press release.

“You cannot put a price on lives lost, addiction suffered, and families torn apart, but with the more than $2 billion we have now delivered to New Yorkers, we can continue to rebuild and recover,” James said in a statement.