Purdue Pharma, the maker of OxyContin, filed for bankruptcy on Sunday — the first expected step of a tentative agreement that the company reached last week to settle thousands of lawsuits related to its alleged involvement in the opioid epidemic.

As part of the settlement, Purdue agreed to file for bankruptcy and effectively dissolve. If all goes as planned, a new company will form and continue selling OxyContin, with the sales revenue going to plaintiffs in the settlement. Purdue will also donate drugs for treating addiction and overdoses.

The settlement does not involve a statement of wrongdoing. Purdue is accused of aggressively — and misleadingly — marketing its blockbuster opioid painkiller OxyContin, helping fuel an opioid crisis that has contributed to the more than 700,000 drug overdose deaths in the US since 1999.

The deal is expected to be worth around $10 billion to $12 billion, including at least $3 billion from the Sackler family that owns Purdue. But that amount is under dispute as overly optimistic by the state attorneys general who have rejected the settlement deal, according to the New York Times.

The Rehab Racket is Vox’s investigation into America’s notoriously opaque addiction treatment industry. We’re crowdsourcing patients’ and families’ rehab stories, with an emphasis on the cost of treatment and quality of care. If you’d like to help our reporting by sharing your story, please fill out this survey.

As of 2016, Purdue had made more than $31 billion in revenue from OxyContin.

The settlement would be the largest payout from any company accused of fueling the opioid crisis. So far, 24 states and more than 2,000 municipal governments agreed to the settlement.

But the rest of the states and Washington, DC, have rejected the deal, describing it as too little, too late. Those jurisdictions are expected to try to hold up the bankruptcy and pursue more action against, in particular, the Sacklers, who are valued at $13 billion by Forbes and would walk away from the current deal as billionaires.

The goal of the lawsuits is to not just hold Purdue and others allegedly involved in the opioid epidemic accountable for the crisis, but also force them to pay for addiction treatment that could help combat the epidemic. Treatment is notoriously underfunded in the US, with experts in recent years calling on the federal government to invest tens of billions of dollars in building up treatment infrastructure. (For reference, a 2017 study from the White House Council of Economic Advisers linked a year of the opioid crisis to $500 billion in economic losses.)

Some politicians and activists have gone further than the lawsuits — demanding not just that opioid manufacturers and distributors pay for the financial harm they caused, but that they are held criminally liable. Several Democratic presidential candidates have proposed legislation that would attempt to hold individual executives accountable for their role in fueling opioid overprescribing.

“If no Sacklers end up behind bars, an entire class of people will continue to feel that writing a check is the worst thing that will happen to them ever no [matter] what they do,” Keith Humphreys, a drug policy expert at Stanford, said on Twitter.

At least for now, though, Purdue and the Sacklers are only facing financial consequences.

How drug companies helped cause the opioid epidemic

The opioid epidemic can be understood in three waves. In the first wave, starting in the late 1990s and early 2000s, doctors prescribed a lot of opioid painkillers. That caused the drugs to proliferate to widespread misuse and addiction — among not just patients but also friends and family of patients, teens who took the drugs from their parents’ medicine cabinets, and people who bought excess pills from the black market.

A second wave of drug overdoses took off in the 2000s when heroin flooded the illicit market, as drug dealers and traffickers took advantage of a new population of people who used opioids but either lost access to painkillers or simply sought a better, cheaper high. And in recent years, the US has seen a third wave, as fentanyl offers an even more potent, cheaper — and deadlier — alternative to heroin.

It’s the first wave that really kicked off the opioid crisis — and it’s where marketing for opioid painkillers is likely most relevant. Multiple studies have now linked marketing for opioid painkillers to addiction and overdoses, particularly direct marketing to doctors that encouraged them to prescribe more of the drugs. And another study linked an increase in the supply of opioid painkillers to more overdose deaths.

Beyond the research, we’ve also seen more reports over the past few years about opioid companies aggressively marketing their products, even as it became clearer that the drugs weren’t the safe, effective alternative to other painkillers on the market that they claimed the opioids to be.

A filing in Massachusetts Attorney General Maura Healey’s lawsuit against Purdue exposed how Richard Sackler, then Purdue’s president and part of the family that owns Purdue, was personally involved in some of those efforts. The filing claims that Sackler pushed to market OxyContin as a “non-narcotic” in other countries, even though it’s an opioid; Robert Kaiko, who created OxyContin, had to talk him down from the idea.

The company also allegedly overlooked excessive prescribing in the US, even as some of Purdue’s staff warned of pill mills that should have been reported to federal officials, Maia Szalavitz reported for Tonic.

Purdue countered that the filing “is littered with biased and inaccurate characterizations of these documents and individual defendants, often highlighting potential courses of action that were ultimately rejected by the company.”

Other reports, however, suggest opioid companies were widely irresponsible. As a group of public health experts explained in the Annual Review of Public Health, opioid companies exaggerated the benefits and safety of their products, supported advocacy groups and “education” campaigns that encouraged widespread use of opioids, and lobbied lawmakers to loosen access to the drugs. Purdue, as the maker of the then-new OxyContin, played a big role in these efforts, but so did companies like Johnson & Johnson, Endo, Teva, and Abbott Laboratories.

The result: As opioid sales grew, so did addiction and overdoses.

It’s not just that the drugs were deadly; they also weren’t anywhere as effective as Purdue and others claimed. There’s only very weak scientific evidence that opioid painkillers can effectively treat long-term chronic pain as patients grow tolerant of opioids’ effects — but there’s plenty of evidence that prolonged use can result in very bad complications, including a higher risk of addiction, overdose, and death. In short, the risks and downsides outweigh the benefits for most pain patients.

Yet even as these risks became apparent over the years, drug companies continued marketing the opioids. (Purdue didn’t stop advertising opioids to doctors until last year.)

So different levels of government are now trying to hold the companies responsible — and get them to pay to help fix the mess that they contributed to.

For more on the lawsuits against opioid companies, read Vox’s explainer.