A U.S. judge on Tuesday rejected efforts by major drugmakers, pharmacies and distributors to dismiss claims that they caused the nation’s opioid crisis, clearing the way for a scheduled landmark trial even as he pushes for a nationwide settlement.

U.S. District Judge Dan Polster, who oversees roughly 2,000 opioid lawsuits by states, counties and cities, said the plaintiffs can try to prove that drugmakers’ deceptive marketing of the painkillers caused a harmful, massive increase in supply that pharmacies and distributors did not do enough to stop.

“A factfinder could reasonably infer that these failures were a substantial factor in producing the alleged harm suffered by plaintiffs,” the Cleveland-based judge wrote.

The ruling was among seven decisions and orders totaling 80 pages from Polster ahead of a scheduled Oct. 21 trial by two Ohio counties against Purdue Pharma, the OxyContin maker accused of fueling the epidemic, and several other defendants.

Polster also refused to dismiss civil conspiracy claims against drugmakers, pharmacies and distributors, and said federal law did not preempt much of the plaintiffs’ case.

Other defendants included the drugmakers Endo International Plc and Johnson & Johnson; pharmacy operators CVS Health Corp, Rite Aid Corp, Walgreens Boots Alliance Inc and Walmart Inc; and distributors AmerisourceBergen Corp, Cardinal Health Inc and McKesson Corp.

Polster also refused to dismiss a variety of claims against generic drugmakers Allergan Plc, Mallinckrodt Plc and Teva Pharmaceutical Industries Ltd.

Opioid addiction claimed roughly 400,000 lives in the United States from 1999 to 2017, according to the U.Spurdue. Centers for Disease Control and Prevention.

Critics of the industry said opioid makers hid the addiction and abuse risks of prolonged use from consumers.

Rite Aid’s lawyers declined to comment. Lawyers for other major defendants did not immediately respond to requests for comment.

Paul Hanly, a lawyer for the plaintiffs, said his clients were pleased that Polster “almost uniformly” agreed with their positions on the dismissal requests and whether to admit various testimony.

J&J has said it will appeal an Oklahoma judge’s Aug. 26 order that it pay $572.1 million to that state for the company’s role in the opioid epidemic.

Purdue and its owners, the Sackler family, have been in talks on a possible $10 billion to $12 billion nationwide settlement of opioid claims, two people familiar with the matter said last week.

That accord could include a bankruptcy filing for the Stamford, Connecticut-based company. Purdue and the Sacklers have denied the allegations.

The case is In re National Prescription Opiate Litigation, U.S. District Court, Northern District of Ohio, No. 17-md-02804.