U.S. District Judge Ricardo Urbina dismissed the case against the guards accused of the shooting in a crowded Baghdad intersection in 2007.
The shooting in busy Nisoor Square left 17 Iraqis dead. The Iraqi government wanted the guards to face trial in Iraq and officials there said they would closely watch how the U.S. judicial system handled the case.
Urbina said the prosecutors ignored the advice of senior Justice Department officials and built their case on sworn statements that had been given under a promise of immunity. Urbina said that violated the guards' constitutional rights. He dismissed the government's explanations as "contradictory, unbelievable and lacking in credibility."
"We're obviously disappointed by the decision," Justice Department spokesman Dean Boyd said. "We're still in the process of reviewing the opinion and considering our options."
Prosecutors can appeal the ruling.
Ali al-Dabagh, the Iraqi government spokesman, said in a statement Friday that the government was dismayed by the court's dismissal of the case.
"The Iraqi government regrets the decision," he said. "Investigations conducted by specialized Iraqi authorities confirmed unequivocally that the guards of Blackwater committed the crime of murder and broke the rules by using arms without the existence of any threat obliging them to use force."
"The Iraqi government will follow up its procedures strictly and firmly to pursue the criminals of the above named company and to preserve the rights of the Iraqi citizens who were victims or the families who suffered losses from this crime."
Dr. Haitham Ahmed, whose wife and son were killed in the shooting, said the decision casts doubt on the integrity of the entire U.S. justice system.
"If a judge ... dismissed the trial, that is ridiculous and the whole thing has been but a farce," Ahmed said. "The rights of our victims and the rights of the innocent people should not be wasted."
Dozens of Iraqis, including the estates of some of the victims allegedly killed by Blackwater employees, filed a separate lawsuit last year alleging that Blackwater employees engaged in indiscriminate killings and beatings. The civil case is still before a Virginia court.
Blackwater contractors had been hired to guard U.S. diplomats in Iraq. The guards said insurgents ambushed them in a traffic circle. Prosecutors said the men unleashed an unprovoked attack on civilians using machine guns and grenades.
The shooting led to the unraveling of the North Carolina-based company, which since has replaced its management and changed its name to Xe Services.
The five guards are Donald Ball, a former Marine from West Valley City, Utah; Dustin Heard, a former Marine from Knoxville, Tenn.; Evan Liberty, a former Marine from Rochester, N.H.; Nick Slatten, a former Army sergeant from Sparta, Tenn., and Paul Slough, an Army veteran from Keller, Texas.
Defense attorneys said the guards were thrilled by the ruling after more than two years of scrutiny.
"It's tremendously gratifying to see the court allow us to celebrate the new year the way it has," said attorney Bill Coffield, who represents Liberty. "It really invigorates your belief in our court system."
"It's indescribable," said Ball's attorney, Steven McCool. "It feels like the weight of the world has been lifted off his shoulders. Here's a guy that's a decorated war hero who we maintain should never have been charged in the first place."
The five guards had been charged with manslaughter and weapons violations. The charges carried mandatory 30-year prison terms.
Urbina's ruling does not resolve whether the shooting was proper. Rather, the 90-page opinion underscores some of the conflicting evidence in the case. Some Blackwater guards told prosecutors they were concerned about the shooting and offered to cooperate. Others said the convoy had been attacked. By the time the FBI began investigating, Nisoor Square had been picked clean of bullets that might have proven whether there had been a firefight or a massacre.
The Iraqi government has refused to grant Blackwater a license to continue operating in the country, prompting the State Department to refuse to renew its contracts with the company.
In a statement released by its president, Joseph Yorio, the company said it was happy to have the shooting behind it.
"Like the people they were protecting, our Xe professionals were working for a free, safe and democratic Iraq for the Iraqi people," Yorio said. "With this decision, we feel we can move forward and continue to assist the United States in its mission to help the people of Iraq and Afghanistan find a peaceful, democratic future."
The top U.S. commander in Iraq, Gen. Raymond Odierno, declined to comment on the specifics of the case, but said, "I do worry about it, because clearly there were innocent people killed in that attack ... it is heart-wrenching."
The case against the five men fell apart because, after the shooting, the State Department ordered the guards to explain what happened. In exchange for those statements, the State Department promised the statements would not be used in a criminal case. Such limited immunity deals are common in police departments so officers involved in shootings cannot hold up internal investigations by refusing to cooperate.
The five guards told investigators they fired their weapons, an admission that was crucial because forensic evidence could not determine who had fired.
Because of the immunity deal, prosecutors had to build their case without those statements, a high legal hurdle that Urbina said the Justice Department failed to clear. Prosecutors read those statements, reviewed them in the investigation and used them to question witnesses and get search warrants, Urbina said. Key witnesses also reviewed the statements and the grand jury heard evidence that had been tainted by those statements, the judge said.
The Justice Department set up a process to avoid those problems, but Urbina said lead prosecutor Ken Kohl and others "purposefully flouted the advice" of senior Justice Department officials telling them not to use the statements.
It was unclear what the ruling means for a sixth Blackwater guard, Jeremy Ridgeway, who turned on his former colleagues and pleaded guilty to killing one Iraqi and wounding another. Had he gone to trial, the case against him would likely have fallen apart, but it's unclear whether Urbina will let him out of his plea deal.
By Associated Press Writer Matt Apuzzo; AP Writers Bushra Juhi and Rebecca Santana in Baghdad contributed to this report