For years, long after the opioid crisis began, the giant pharmacy chains, includin g Walgreens and CVS, and Walmart did almost nothing to fulfill their legal duty to monitor suspicious orders, the plaintiffs’ lawyers claim. While they were supposed to block such orders and alert the Drug Enforcement Administration, they did so rarely.

One official at Walgreens tasked with monitoring such orders said his department was “not equipped” for that work. The company created lists of suspicious orders that ran thousands of pages, but then shipped them without further review.

Asked for a response, Walgreens issued a statement saying it “has not distributed prescription controlled substances since 2014 and before that time only distributed to our chain of pharmacies.” The company called itself “an industry leader in combating this crisis.”

An official at CVS who was listed as the company’s D.E.A. compliance coordinator admitted that it was not her real job, the plaintiffs’ filing said. Much of the company’s compliance was relegated to “pickers and packers” — the warehouse workers at distribution centers who appeared to have no formal training in monitoring and rarely held up orders. In the company’s Indianapolis distribution center, approximately two orders were flagged each year from 2006 to 2014.

Before 2011, Walmart had no discernible system to monitor suspicious orders. the plaintiffs contended. The company said that it relied on its hourly employees, which the plaintiffs called a “farcical” claim with no evidence of training or policy in place.

By 2015, the company put a system of storewide limits in place, but it was so forgiving that a store could go from ordering 10 dosages of 10 milligrams of oxycodone in one month, to 7,999 dosages the next, without raising an alarm. In a filing Friday, Walmart said that its pharmacy business accounted “for a vanishingly small part of the relevant market” and noted that an expert for the plaintiffs had concluded that Walmart distributed less than 1.3 percent of the opioids distributed to the Ohio counties that brought the case.

Rite Aid, in its own filing, said that “plaintiffs have presented no evidence” that the company’s “limited distribution of opioids caused any of their injuries,” an argument echoed by CVS, which said in its filing there was “no evidence’ that any CVS shipment to the counties was misused.