Walmart has filed a lawsuit against the U.S. government, asking a court to declare the company and its pharmacists were not responsible for improperly distributing opioid prescriptions.

The company filed the suit in anticipation of the federal government seeking large financial penalties against Walmart for the role its pharmacies may have played in the opioid crisis by filling painkiller prescriptions, CBS News reports.

In the lawsuit, Walmart says the Justice Department and the Drug Enforcement Administration (DEA) are blaming the company for the government’s lack of enforcement and regulatory policies to stop the opioid crisis.

Walmart, the country’s largest retailer, operates more than 5,000 in-store pharmacies in the U.S.

The company said in a news release, “Walmart and our pharmacists are torn between demands from DEA on one side and health agencies and regulators on the other, and patients are caught in the middle. We need a court to clarify the roles and legal responsibilities of pharmacists and pharmacies in filling opioid prescriptions.”