NEW ORLEANS — Citing “grotesque prosecutorial misconduct” on the part of federal lawyers here and in Washington, a judge on Tuesday threw out the 2011 convictions of five former police officers who had been found guilty in a momentous civil rights case of killing two citizens and engaging in an extensive cover-up in the days after Hurricane Katrina.

In a heated 129-page decision, Judge Kurt D. Englehardt of Federal District Court here declared that federal prosecutors had created a “prejudicial, poisonous atmosphere” in making anonymous online comments before and during the trial at nola.com, the Web site of The Times-Picayune, and ordered a new trial for all five officers.

The decision represented the collapse, for now, of a case that was seen as symbolizing both the profound breakdown of law and order after the hurricane and a deep rot within the city’s police department that dated back well before the storm.

While a scandal over anonymous online commenting had already cut short the federal careers of two local prosecutors and the United States attorney himself, Tuesday’s decision identified another, previously unknown commenter: a veteran lawyer in the Department of Justice in Washington who had a role in preparing the case for trial.