Two of the nation's largest retail pharmacy chains said on Wednesday that they had reached tentative agreements to pay billions of dollars to settle thousands of lawsuits.

State, municipal and tribal governments are required to sign on to the finalization of the case in order for it to take place.

If the deals are finalized, they will represent payouts from the arm of the pharmaceutical industry that has been most resistant to striking a deal with thePlaintiffs. The three largest drug distribution companies have settled.

The big retailers decided to test their arguments in court while negotiations were still going on. In August, a federal judge ordered drugstores to pay hundreds of millions of dollars to two Ohio counties to offset the costs of their role in the opiate crisis. A jury found that the companies turned a blind eye to the diversion of prescription drugs and ignored red flags. The cases were brought in Florida and West Virginia.

Josh Stein, the attorney general of North Carolina, who is on the executive committee of states handling the negotiations, confirmed the tentative deal.

Card 1 of 5

Understand how the drug affects you. Fentanyl is a drug that is very addictive. It is easy to overdose on a small amount. There is only a short time to save a person's life during an overdose with Fentanyl.

Don't go to unlicensed pharmacy. Fentanyl is found in many prescription drugs sold online or by unlicensed dealers. Only pills that were prescribed by your doctor are allowed to be taken.

You should talk to your friends and family. Fentanyl use can be prevented by educating your loved ones about it. Fentanyl can be found in pills purchased online or from friends. The aim is to establish an ongoing dialogue in short spurts.

You can learn how to spot overdoses. When someone overdoses on Fentanyl, their skin becomes bluish. Call the emergency number if you think someone is abusing drugs. If you are concerned that a loved one could be exposed to Fentanyl, you may want to buy Narcan, a medicine that can reverse an overdose in a matter of minutes.

According to a person familiar with the negotiations, Walmart had agreed to pay more than $3 billion. The company didn't say anything.

The agreements did not represent an admission of wrongdoing on the part of the companies.

Over the next 10 years, the company said it would pay over $5 billion to governments and tribes.

"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." We will continue our own initiatives to help reduce the illegitimate use of prescription opiate drugs.

Walgreens said it would pay $4.79 billion over 15 years to the states. It would pay lawyers' fees and costs over the course of six years.

Walgreens said in a statement that the settlement framework would allow them to focus on the health and well being of their customers and patients.

It's not clear how many states, cities and tribes will agree to these proposals, given how long the negotiations have been. It does not include a recent New Mexico trial before a state judge.

Lawyers for cities and counties across the country issued a statement urging people to work on a deal.

All states, subdivisions and Native American tribes are encouraged to join us once these agreements and allocation processes are finalized to expedite the process of providing these lifesavers.