A federal judge has denied a bid by Perdue Farms and an Eastern Shore chicken grower to dismiss a lawsuit accusing them of polluting a Chesapeake Bay tributary, clearing the way for trial on the potentially pioneering legal case.

Judge William M. Nickerson of the U.S. District Court in Baltimore ruled Tuesday that the lawsuit brought this year by the Waterkeeper Alliance could go forward, though he struck two environmental groups as plaintiffs on a technicality.

The Waterkeeper Alliance, the Assateague Coastal Trust and Assateague Coastkeeper Kathy Phillips filed suit in March alleging that harmful levels of bacteria and nutrient pollution were flowing from a drainage ditch on a Worcester County farm into a branch of the Pocomoke River. It is the first lawsuit to target Maryland’s chicken industry for water pollution, and it named not just the farmers as defendants but poultry giant Perdue Farms, based in Salisbury, for whom the chickens were being raised.

Lawyers for the farmers, Alan and Kristin Hudson of Berlin, and for Perdue had petitioned the judge to dismiss the case on a variety of legal grounds, and Perdue had argued that it should be let out of the lawsuit. The company contended that it was not liable for any pollution because the Hudsons owned the farm and held the government permit to raise chickens there, not Perdue. The couple was raising 80,000 Cornish game hens under contract with Perdue, a common arrangement in the poultry industry.