NEW ORLEANS — A judge threw out murder and attempted murder charges Wednesday against seven New Orleans police officers accused of gunning down two men on a bridge in the chaotic aftermath of Hurricane Katrina.

In quashing the indictments, District Judge Raymond Bigelow agreed with defense arguments that prosecutors violated state law by divulging secret grand jury testimony to a police officer who was a witness in the case.

Survivors of the Sept. 4, 2005, shootings have said the officers fired at unarmed people crossing the Danziger Bridge to get food at a grocery store. Ronald Madison, a 40-year-old mentally disabled man, and James Brissette, 19, were shot and killed by police; four other people were wounded.

The officers acknowledged shooting at people on the bridge, but said they did so only after taking fire.

Katrina struck on Aug. 29, 2005. In its aftermath, levees broke, flooding 80 percent of New Orleans. Chaos gripped the city, and looting was reported in some areas. Rescuers said they thought gunfire was directed at them.

Later investigation revealed at least some of the shooting was by residents trapped by floodwater trying to attract the attention of rescue parties.

Survivors of the shooting said in civil suits that they were unarmed and ambushed by the officers, who jumped out of the back of a rental truck and started shooting.

Sgt. Kenneth Bowen, Sgt. Robert Gisevius Jr., Officer Anthony Villavaso II and former Officer Robert Faulcon Jr. each faced first-degree murder and attempted murder charges in the case. Bigelow also threw out attempted first-degree murder charges against Officer Mike Hunter Jr. and Officer Robert Barrios and attempted second-degree murder charges against Officer Ignatius Hills.

Faulcon resigned from the police force; the other officers were assigned to desk duty after their indictment.

Bigelow also said Wednesday that prosecutors had wrongly instructed the grand jury, and that grand jury testimony by three of the officers was used against them improperly.

"It bordered on deliberate misuse of the law," Bigelow said. He gave the district attorney's office until Sept. 18 to decide if it would appeal.

Assistant District Attorney Robert White said his office would analyze the rulings and consider appealing. The office could also convene another grand jury to consider new charges against the officers.

"The ruling was not a total surprise," White said.

The officers sat quietly on one side of the court room and did not visibly react to Bigelow's ruling.

"We are very pleased for all the officers," said Bruce Whittaker, the attorney for Hills. "Now these men can get back to doing the work they love."

Madison's brother said the family hoped the Justice Department would investigate the matter. Keva Landrum-Johnson, the interim district attorney, asked U.S. Attorney General Michael B. Mukasey to have his civil rights division investigate case, according to a letter dated Aug. 8 that the family provided reporters.

"Our family today still feels that the ruling just proves again that the justice system here in New Orleans is still flawed," said Dr. Romell Madison.

A message left after hours seeking comment on the letter wasn't immediately returned by Justice Department staff in Washington.

U.S. Attorney Jim Letten in New Orleans said he hadn't been formally notified of Bigelow's ruling and wouldn't comment on it. Letten said he has told the Madison family that his office would not intervene while the district attorney's office had an "active case ongoing."

Bigelow ordered bracelets used to track the officers' whereabouts removed but did not remove the bail each paid until the district attorney decides what to do.

Police spokesman Bob Young said the officers would return to regular jobs quickly, but he was not sure where they would be placed.

Members of the group Safe Streets, Strong Communities attended the hearing and demonstrated outside the courthouse after the ruling.

"The Danziger case is yet another example of a police department in crisis and a criminal justice system unwilling to keep them in check," said Norris Henderson, co-director of the group.

The case was the latest in a series of high-profile, emotional criminal prosecutions tied to Katrina that have fizzled.

Last year a grand jury refused to charge a doctor and two nurses in connection with the deaths of four patients at a New Orleans hospital after the storm. A jury also returned a not-guilty verdict against the operators of a St. Bernard Parish nursing home where more than 30 residents died in the storm's flooding.