OxyContin maker Purdue Pharma and the family who owns Purdue will pay $270 million to the state of Oklahoma to settle a lawsuit over the drug company’s role in causing the opioid epidemic, the Washington Post and Reuters reported.

Most of the money will go to a new research, education, and treatment center at Oklahoma State University in Tulsa that will focus on addiction and pain. It will also go to city budgets, treatment medications, and legal fees. Purdue will pay roughly $195 million, while the Sackler family — which owns Purdue — will pay $75 million over five years, according to the Post and Reuters.

Oklahoma will likely continue with separate lawsuits against opioid makers Johnson & Johnson and Teva Pharmaceutical Industries. Those cases are expected to begin in May.

The settlement is the latest legal blow against Purdue, which has been blamed for helping cause the opioid crisis by irresponsibly marketing the opioid painkiller OxyContin. After the launch of the drug in the mid-1990s, the first wave of the crisis began as opioid painkillers proliferated and the drugs were widely misused, leading to addiction and overdose.

In 2007, Purdue Pharma and three of its top executives paid more than $630 million in federal fines for their misleading marketing, and the executives were each sentenced to three years of probation and 400 hours of community service. But the latest rounds of lawsuits argue that Purdue continued to market opioids irresponsibly even after the fines.

Oklahoma is not the only state pursuing legal action; other states are also suing opioid makers and distributors. And a separate collection of about 1,600 lawsuits, largely from various levels of government, has been consolidated by a federal judge in Cleveland in an attempt to reach a landmark legal resolution to the opioid epidemic.

Since 1999, more than 700,000 people in the US have died of drug overdoses, mostly driven by an increase in opioid-related deaths. That’s comparable to the number of people who currently live in big cities like Denver and Washington, DC. Some estimates predict that hundreds of thousands more could die in the next decade of opioid overdoses alone.

The hope 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. Addiction 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.)

There’s good evidence, too, that drug companies are the right target for legal action.

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 fentanyls offer 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.

Recently, 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 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.