According to a court filing Thursday, members of the Sackler family and their company have reached a deal with a group of states that had resisted the company's bankruptcy plan, opening the way for billions of dollars to begin flowing to addiction treatment programs nationwide.

The Sacklers will pay as much as $6 billion if Judge Robert Drain approves the agreement.

In return, family members will get the prize they had insisted upon for nearly three years: an end to all civil claims against them over the company's prescription opioid business.

Criminal prosecutions are not covered by the liability protection.

Two branches of the Sacklers did not acknowledge wrongdoing or personal responsibility for the public health crisis.

No individual Sackler has ever apologized or admitted wrongdoing despite the criminal charges of misleading marketing and minimizing the risk of addiction. In August, Dr. Richard Sackler testified before Judge Drain that neither the family, the company nor its products bore any responsibility for the epidemic.

The latest offer from the Sacklers is insufficient and significant because it is constrained by the federal bankruptcy code, according to William Tong, the attorney general of Connecticut. We are not done fighting for justice against the addiction industry and against our broken bankruptcy code after the settlement with the Sacklers.

A majority of states, local governments, tribes and individuals had already voted in favor of the earlier settlement deal. A federal judge questioned the legality of the protections granted to the Sacklers. If the company's owners did not file for personal bankruptcy, they would get the same protection from lawsuits that corporate bankruptcies give.

The Sacklers began talks with the District of Columbia and the eight holdout states. The Sacklers had to agree to pay an additional $1 billion to get holdouts on board. They will pay $5.5 billion plus a contribution of up to $500 million if they sell their international pharmaceutical companies.

The Sacklers agreed to a number of new terms after hundreds of hours of negotiations. The Sackler statement is one of the things that Judge Chapman is suggesting a hearing on. If Sacklers are asked to have it removed, they must acquiesce.

There are two potential hurdles that the new settlement still faces. Even if Judge Drain signs off, the plan needs to be approved by the Second Circuit.

The immunity shield for the Sacklers from civil suits is being challenged by the U.S. Trustee program. The Justice Department didn't return a request for comment about the case.

A public board will be in charge of the company under the agreement. The restructured company will give over a billion dollars to the programs over the next four years, as it becomes a manufacturer of drugs for addiction reversal and treatment.

The shield against lawsuits was the main sticking point for states that fought the plan. California, Connecticut, Delaware, Maryland, New Hampshire, Oregon, Rhode Island, Vermont and Washington voted against the earlier proposal because they believed they should have the right to pursue the Sacklers under state civil laws.

The earlier deal had less money but was to be paid out over nine years. The revised plan shows that the Sacklers have 18 years to pay the additional $1 billion.

The opiate crisis continued to get worse as marathon sessions of negotiations dragged on. The dilemma for the holdout governments was whether to keep pursuing the Sacklers in court, a process that could take years with no guarantee of victory, or just take the money, now that the cash offer had increased.

The states and their local governments will get bigger payouts than the original deal outlined, but the holdout states will get more as a bonus for their resistance. The $750 million set aside to compensate more than 100,000 individual victims and survivors and whose stories help build the governmental lawsuits will not grow, but states have committed to funding a trust specifically for them.

At least $750 million is being protected which is better than no money at all, said Ryan Hampton, who monitored the long proceedings on behalf of victims. The bankruptcy needs to end. The Justice Department needs to investigate the Sacklers criminally, which is permissible under the bankruptcy plan.