This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

The two largest U.S. pharmacy chains, CVS Health and Walgreen Co., announced agreements in principle Wednesday to pay about $5 billion each to settle lawsuits nationwide over the toll of opioids, and a lawyer said Walmart, a third pharmacy behemoth, is in discussions for a deal.

The prospective settlements are part of a shift in the legal landscape surrounding the opioid epidemic. Instead of suspense over whether companies in the drug industry would be held to account through trials or settlements, the big question is now how their money will be used and whether it will make a difference in fighting a crisis that has only intensified.

The deals, if completed, would end thousands of lawsuits in which governments claimed pharmacies filled prescriptions they should have flagged as inappropriate. With settlements already proposed or finalized between some of the biggest drugmakers and distribution companies, the recent developments could be the among the last multibillion-dollar settlements to be announced.

They also would bring the total value of all settlements to more than $50 billion, with most of it required to be used by state and local governments to combat opioids, which have been linked to more than 500,000 deaths in the U.S. over the last two decades.

“It’s one more culprit of the overdose crisis that is having to pay their dues,” said Courtney Gary-Allen, organizing director of the Maine Recovery Advocacy Project. “Average Americans have been paying it for a long time.”

Gary-Allen, who is a member of a council that will help determine how Maine uses its opioid settlement funds, said more money to address the problem will help. In her state, she said, the needs include more beds for medical detox and for treatment.

Neither Woonsocket, Rhode Island-based CVS nor Deerfield, Illinois-based Walgreens is admitting wrongdoing.

The plans spring from mediation involving a group of state attorneys general. Before they move ahead, state and then local governments would need to sign on. So far, the detailed, formal deals have not been presented to the government entities so they can decide whether to join.

Under the tentative plans, CVS would pay $4.9 billion to local governments and about $130 million to Native American tribes over a decade. Walgreens would pay $4.8 billion to governments and $155 million to tribes over 15 years. The exact amount depends on how many governments join the deals.

Both noted they have been addressing the crisis through such measures as starting educational programs and installing safe disposal units for drugs in stores and police departments. And both said the settlements would allow them to help while staying focused on their business.

“We are pleased to resolve these longstanding claims and putting them behind us is in the best interest of all parties, as well as our customers, colleagues and shareholders,” Thomas Moriarty, CVS chief policy officer and general counsel, said in a statement.

Walgreens said in a statement: “As one of the largest pharmacy chains in the nation, we remain committed to being a part of the solution, and this settlement framework will allow us to keep our focus on the health and wellbeing of our customers and patients, while making positive contributions to address the opioid crisis,” Walgreens said in a statement.

Paul Geller, a lawyer for governments in the lawsuits, said talks with Walmart continue. Walmart representatives would not comment Wednesday.

“These agreements will be the first resolutions reached with pharmacy chains and will equip communities across the country with the much-needed tools to fight back against this epidemic and bring about tangible, positive change,” lawyers for local governments said in a statement. “In addition to payments totaling billions of dollars, these companies have committed to making significant improvements to their dispensing practices to help reduce addiction moving forward.”

If these settlements are completed, they would leave mostly smaller drug industry players as defendants in lawsuits. Just this week, a group of mostly regional pharmacy chains sent to a judge, who is overseeing federal litigation, information about claims they face, a possible precursor to scheduling trials or mediating settlements involving some of those firms.

“One by one, we are holding every player in the addiction industry accountable for the millions of lives lost or devastated by the opioid epidemic,” Connecticut Attorney General William Tong said in a statement. “The companies that helped to create and fuel this crisis must commit to changing their businesses practices, and to providing the resources needed for treatment, prevention and recovery.”

Most of the nation’s opioid overdose deaths initially involved prescription drugs. As governments, doctors and companies took steps to make them harder to abuse and obtain, people addicted to them increasingly switched to heroin, which proved more deadly.

In recent years, opioid deaths have soared to record levels around 80,000 a year. Most of those deaths involve illicitly produced version of the powerful lab-made drug fentanyl, which is appearing throughout the U.S. supply of illegal drugs.

Only a handful of opioid settlements have had bigger dollar figures than the CVS plan. Distributors AmerisourceBergen, Cardinal Health and McKesson this year finalized a combined settlement worth $21 billion, and drugmaker Johnson & Johnson finalized a $5 billion deal.

Purdue Pharma, the maker of OxyContin, and members of the Sackler family who own the company have a proposed settlement that would involve up to $6 billion in cash, plus the value of the company, which would be turned into a new entity with its profits used to combat the epidemic. That plan has been put on hold by a court.

___

Associated Press writer Tom Murphy in Indianapolis contributed to this report.