After a marathon mediation session, Pennsylvania 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 at a hearing scheduled for Aug. 9 in the federal courthouse in White Plains, New York, Purdue and the Sacklers will pay $4.5 billion for prevention, treatment, and recovery programs related to opioid addiction across the United States.