The reckoning for the worst drug epidemic in U.S. history began Tuesday, with Purdue Pharma and the state of Oklahoma agreeing to a $270 million out-of-court settlement in the first major test of who will pay for more than two decades of death and addiction sparked by prescription opioids.

Purdue — the maker of prescription painkiller OxyContin — and dozens of other drug companies still face more than 1,600 other lawsuits filed by cities, counties, states and Native American tribes that allege culpability in the nation’s opioid epidemic. There is little certainty about how Tuesday’s outcome will affect those cases, but Oklahoma and Purdue, at least, have reached a landmark deal that begins to address that state’s opioid crisis.

Under the terms of the Oklahoma settlement, Purdue will immediately contribute $102.5 million to establish a new foundation for addiction treatment and research at Oklahoma State University. Members of the Sackler family, who own the company but were not defendants in the case, will pay an additional $75 million in personal funds over five years. Purdue also will provide $20 million worth of treatment drugs, pay $12 million to cities and towns and cover about $60 million in litigation costs.

Purdue also avoided a bruising, televised jury trial and bought time before its next scheduled court appearance, in October in the Ohio federal court where most of the lawsuits have been consolidated into one enormous case.

Oklahoma wrestled a significant payment from the drugmaker, money that might not be available if Purdue is forced into bankruptcy because of the claims against it. The state won prohibitions against Purdue promoting opioids in the state, or visiting doctors to persuade them to buy its products, until 2026.

“Instead of continuing on in court for many, many years, we have a settlement with a significant amount of money, to be used immediately,” said Gary Mendell, who is founder of the anti-addiction group Shatterproof and consulted with the two sides on creation of the foundation. “To spare other families from having to bury a child, today was a very good day.”

In the lawsuit that Oklahoma Attorney General Mike Hunter (R) filed in June 2017, the state contended that three companies misrepresented the addictive qualities of their opioid drugs. The lawsuit argued the companies are responsible for thousands of opioid deaths across the state, as well as the health care, law enforcement and treatment costs of the state’s addiction crisis.

Oklahoma will continue to press its case against the two other defendants, the much larger Johnson & Johnson, and Teva Pharmaceutical Industries. Hunter, at a news conference Tuesday afternoon in Tulsa, vowed that the state is ready to go to a trial, now scheduled to begin May 28. Johnson & Johnson and Teva did not respond to requests for comment Tuesday.

Thirty-five other states have sued drug companies in their own court systems.

“This is the starting gun,” said Nicolas Terry, a law professor at Indiana University’s McKinney School of Law who has written a comparison of the opioid lawsuits and the landmark tobacco settlement of 1998. “This is the beginning of the endgame.”

There was little agreement Tuesday on whether, or how, the Oklahoma settlement could affect those other cases.

Paul Hanly, co-leader of the plaintiffs’ legal team in the Cleveland federal case, said the settlement with Purdue seems like “quite a good deal” for Oklahoma.

“The broader significance is it does show that at least one defendant is cognizant of the strength of these claims, because if they weren’t they’d just go to trial,” he said. “I think people will look at it as a bellwether. I think people will . . . try to extrapolate what this might mean for a national settlement.”

But Abbe R. Gluck, a professor at Yale Law School and director of the Solomon Center for Health Law and Policy, said that “if this one judgment out of 2,000 is now sort of hijacking the negotiation process, that’s probably not productive. It shouldn’t be . . . that the case that races to the courthouse first depletes all the assets of the defendant who is litigating, simultaneously, 2,000 other cases.”

In an interview this month, Purdue chief executive Craig Landau said the company is considering bankruptcy as an option as it weighs the potential impact of future legal settlements or jury verdicts that could total tens of billions of dollars. Terry questioned why Purdue would not declare bankruptcy before its first settlement, if that is its larger plan.

“Why not declare bankruptcy now?” he asked. “My guess is that there is some other game afoot.”

A person familiar with Purdue’s legal strategy said it would be a mistake to think of the Oklahoma settlement as setting any kind of ceiling for potential financial liability, noting that Purdue appears to now be focused on the major case in Ohio over all others.

In a statement, Purdue said it is happy to have reached an agreement that resolves the state’s claims against the company and applauded Hunter for making the deal possible.

“We see this agreement with Oklahoma as an extension of our commitment to help drive solutions to the opioid addiction crisis, and we pledge Purdue’s ongoing support to the National Center and the lifesaving work it will do for generations to come,” the company said, referring to the addiction center to be formed at Oklahoma State.

Nearly 400,000 people in the United States died of opioid overdoses between 1999 and 2017, according to the Centers for Disease Control and Prevention, including a record 47,600 in 2017. Purdue is widely blamed with helping to start the epidemic after it introduced the powerful opioid OxyContin to the market in 1996.

The company allegedly persuaded doctors to prescribe — and overprescribe — the drug for a variety of ailments beyond its intended use for cancer pain and end-of-life care. In 2007, Purdue and three of its executives pleaded guilty to misconduct in their marketing of OxyContin and paid more $600 million in fines.

Authorities argued that Purdue used deceptive marketing tactics and a sizable workforce of representatives who repeatedly visited physicians to sell them narcotics, assuring them that the drugs were rarely addictive. Many patients became addicted to the potent painkillers, and large amounts of the drug were diverted to the black market.

More than 2 million Americans suffer from an opioid-use disorder, according to government data. The epidemic is now driven by illicit fentanyl, a powerful synthetic opioid made in clandestine labs overseas that has caused overdoses and fatalities to soar.

Three years ago, the CDC estimated the cost of the opioid epidemic at $78.5 billion for calendar year 2013. In 2017, the White House Council of Economic Advisers placed the price tag at a much higher $504 billion for 2015.

A consultant’s report that Oklahoma filed in the current case estimated that abating the opioid crisis in that state would cost more than $8.7 billion over the next 20 years. According to a lawsuit filed by the state of Massachusetts, Sackler family members received nearly $4.3 billion in payouts from Purdue between 2008 and 2016.

Oklahoma and Purdue have been taking depositions and jousting over pretrial issues since Hunter filed suit nearly two years ago. The state was scheduled to take depositions from two members of the Sackler family this month, but those were postponed, then canceled, as negotiations began to bear fruit, said Bradley Beckworth, one of the state’s attorneys.

As other cases lagged, Judge Thad H. Balkman set a May 28 trial date, agreed to televise the proceedings live and refused drug-company requests to postpone the trial. On Monday, the state’s Supreme Court declined to reverse that ruling. That ensured that the Oklahoma case would be the first major test of whether the companies would be forced to pay for the crisis.

In the meantime, Purdue has suffered heavy blows to its image in recent months as litigation has advanced. Three museums in Britain and the United States have turned down donations from the Sacklers, longtime patrons of the arts, in recent days.

And documents released in the Massachusetts lawsuit, brought by the state’s attorney general, Maura Healey (D), depicted some of the Sacklers as insatiably greedy and uncaring about the human toll of their product.

“Millions of dollars were not enough. They wanted billions,” the lawsuit charges. “They cared more about money than about patients, or their employees, or the truth.”