Walgreens pharmacy counter in Miami Beach, Florida.
CNN  — 

The U.S. Justice Department on Friday accused pharmacy chain operator Walgreens Boots Alliance of contributing to the U.S. opioid epidemic by filling millions of unlawful prescriptions for addictive painkillers and other drugs.

The department intervened in a whistleblower lawsuit filed in federal court in Chicago and accused Walgreens of ignoring “red flags” and filling prescriptions for opioids and other controlled substances that lacked a legitimate medical purpose.

“These practices allowed millions of opioid pills and other controlled substances to flow illegally out of Walgreens stores,” Brian Boynton, the head of the Justice Department’s Civil Division, said in a statement.

The lawsuit alleged that by knowingly filling unlawful prescriptions for controlled substances, Walgreens violated the Controlled Substances Act. The government also alleged it violated the False Claims Act when it then sought reimbursement from federal health care programs, like Medicare, for the prescriptions.

The lawsuit was announced after Walgreens filed its own lawsuit on Thursday challenging what it said were new policies the U.S. Drug Enforcement Administration had unlawfully adopted, seeking to ensure pharmacies do not dispense controlled substances for medically illegitimate purposes.

That lawsuit was filed in federal court in Tyler, Texas, following what Walgreens had described as recently as last week as active negotiations with the Justice Department for a potential settlement to resolve claims it improperly dispensed opioids.

The company’s lawsuit targeted what Walgreens called new, “arbitrary” rules the DEA imposed without going through the required rulemaking process.

“We will not stand by and allow the government to put our pharmacists in a no-win situation, trying to comply with ‘rules’ that simply do not exist,” Walgreens said in a statement.

Walgreens is among the drug manufacturers, distributors, pharmacy operators and others who have collectively in recent years agreed to pay about $50 billion to resolve lawsuits and investigations by states and local governments accusing them of helping fuel a deadly opioid addiction epidemic in the U.S.

The U.S. Centers for Disease Control and Prevention says nearly 727,000 opioid overdose deaths occurred from 1999 to 2022.

The Justice Department last month announced a similar lawsuit against Walgreens rival CVS that accused the pharmacy chain of filling illegal opioid prescriptions and contributing to a nationwide epidemic of opioid addiction.

Walgreens in 2022 agreed to pay up to $5.52 billion over 15 years to resolve thousands of lawsuits by state and local governments accusing the company of fueling the U.S. opioid epidemic.

Last month, Ohio’s top court overturned a $650.9 million judgment two local counties secured against Walgreens, CVS and Walmart in the first case to go to trial nationally over allegations the pharmacies contributed to the epidemic.