A Pennsylvania judge on Friday dismissed the most serious charges against eight Penn State fraternity members indicted in the hazing death of a 19-year-old student, sharply and suddenly defanging prosecutors and setting the stage for a new legal battle in the high-profile case.

After a pretrial hearing that had stretched for days, Magisterial District Judge Allen W. Sinclair appeared Friday morning and, over the course of minutes, orally dismissed one serious charge after another — including involuntary manslaughter, aggravated assault and simple assault — against the men who faced them.

Judge Sinclair, who did not explain his reasoning, left intact the lesser charges, including recklessly endangering another person, hazing and furnishing alcohol to a minor. The men face trial on those charges, but the ruling, if it stands, vastly reduces the likelihood that any of the defendants will go to jail.

Stacy Parks Miller, the district attorney for Centre County, who had called the death “heart wrenching and incomprehensible,” said Friday that the ruling was an “error of law” and vowed to refile at least the involuntary manslaughter charges before a different judge.