Walmart has reached a settlement with the US Department of Justice to resolve a lawsuit accusing the retail giant of improperly filling prescriptions for painkillers, which allegedly contributed to the country’s opioid epidemic. The parties did not publicly disclose the terms of the agreement, but court documents indicate that the federal government agreed to dismiss the case.

The lawsuit, filed in December 2020, followed a multiyear investigation by the Department of Justice. It alleged that Walmart filled invalid prescriptions and failed to report suspicious orders of opioids and other controlled substances at its pharmacies nationwide. According to the suit, Walmart’s management pressured pharmacists to dispense prescriptions quickly, making compliance with federal regulations challenging.

Walmart had previously taken legal action against the Department of Justice and the Drug Enforcement Administration in October 2020, arguing that pharmacists were placed in difficult positions by federal authorities. At the time, the retailer claimed it had blocked thousands of questionable doctors from having their opioid prescriptions filled. That lawsuit was dismissed in 2021.

The company faced potential penalties amounting to billions of dollars if found liable. In a separate legal settlement with multiple states in 2022, Walmart agreed to pay $3.1 billion over allegations that it failed to adequately regulate opioid prescriptions at its stores, which purportedly contributed to the opioid crisis.

The opioid epidemic has had a significant impact across the United States. Data from the Centers for Disease Control and Prevention show that drug overdose deaths increased by approximately 520 percent between 1999 and 2023. More than 905,000 people died from opioid overdoses over nearly three decades, with annual deaths beginning to decline after 2022.

A spokesperson for the Department of Justice affirmed the government’s ongoing commitment to holding companies and individuals accountable when their business practices contribute to the opioid crisis and endanger communities. Walmart did not respond to requests for comment regarding the recent settlement.