After a marathon mediation session, New York and 14 other states have agreed to a proposed settlement with Purdue Pharma and the Sackler family, according to documents filed late Wednesday in the U.S. Bankruptcy Court for the Southern District of New York.

If the settlement plan is approved by U.S. Bankruptcy Judge Robert Drain, Purdue and the Sacklers will pay $4.5 billion over nine years for prevention, treatment and recovery programs related to opioid addiction across the United States. New York is expected to receive at least $200 million from the settlement.