A Connecticut judge has dismissed lawsuits against Purdue Pharma and other drug makers brought by 37 cities and towns in the state that blame the companies for the opioid crisis and sought to recoup millions of dollars spent responding to the crisis.

Judge Thomas Moukawsher in Hartford ruled Tuesday that the lawsuits were not allowed because they were not filed as government enforcement actions authorized by state public interest laws.

Lawyers for several municipalities said appeals are being considered. Bridgeport, New Haven and Waterbury are among the plaintiffs.

Purdue Pharma officials said the judge was right to conclude opioid manufacturers cannot be held responsible to municipalities for indirect harms from the opioid crisis.

More than 1,000 lawsuits against opioid makers by state and local governments remain pending nationwide.