WASHINGTON — A federal appeals court on Friday threw out lengthy prison sentences for three former Blackwater Worldwide security contractors and ordered a new trial for a fourth involved in a deadly 2007 shooting in Baghdad that became a symbol of unchecked, freewheeling American power in Iraq.
The shooting killed or injured at least 31 civilians when contractors unleashed a torrent of machine-gun fire and launched grenades into a crowded downtown Baghdad traffic circle from their heavily armored trucks. An F.B.I. agent once called it the “My Lai massacre of Iraq.”
The ruling is a setback to the effort — which now stretches across three presidential administrations — to demand stiff consequences for the shooting in Baghdad’s Nisour Square.
Along with the massacre by Marines of 24 Iraqi civilians at Haditha and the abuses of Iraqi prisoners at Abu Ghraib prison, it was among the war’s darkest moments and stained the reputation of the United States.
Three of the contractors — Dustin L. Heard, Evan S. Liberty and Paul A. Slough — were convicted in 2014 of voluntary manslaughter and using a machine gun to carry out a violent crime. They were sentenced to 30 years in prison, a mandatory sentence on the machine-gun charge. A fourth, Nicholas A. Slatten, a sniper who the government said fired the first shots, was convicted of murder and received a life sentence.
Defense lawyers argued that the convoy was under fire from insurgents, a claim that prosecutors denied and Iraqi witnesses rejected.
The Nisour Square shooting forced a reconsideration of America’s reliance on contractors in war zones.
Until then, no security contractor was more powerful than Blackwater in the post-Sept. 11 conflicts. Its employees protected American diplomats overseas and worked alongside C.I.A. officers in clandestine counterterrorism operations. The company won more than $1 billion in contracts. Its founder, Erik Prince, has advised the Trump administration, encouraging it to use more private contractors in Afghanistan.
The machine-gun charge in the Iraq case was always contentious, even inside the Justice Department.
Agents had pushed hard to include the charges. “How do we go back there, and face a room full of crippled Iraqis and family members of the deceased, and tell them the U.S. D.O.J. decided that they didn’t want to go too hard on the men who shot everyone that day?” John Patarini, an F.B.I. agent wrote in a 2008 email as authorities debated the charges.
The Justice Department ultimately acquiesced, although some prosecutors believed it was unfair to add an extra penalty for using a weapon that the United States government required them to carry.
The appeals court agreed. The three-judge panel ruled that the machine-gun law was intended to punish people who intentionally brought dangerous weapons with them to carry out violent crimes, and declared the contractors’ sentences “grossly disproportionate to their culpability for using government-issued weapons in a war zone.”
The court ordered that three of the contractors be resentenced, a ruling that could significantly reduce their prison terms.
Mr. Slatten’s conviction was thrown out entirely. Prosecutors had successfully argued that he touched off the killings with a precision shot through the head of a driver of a stopped white Kia as the Blackwater convoy moved through the traffic circle. The Justice Department said Mr. Slatten hated Iraqis and opened fire as part of “payback for 9/11.”
But the appeals court ruled that he never should have been prosecuted in the same trial as his colleagues, one of whom said he — and not Mr. Slatten — fired the first shots.
“The government’s case against Slatten hinged on his having fired the first shots, his animosity toward the Iraqis having led him to target the white Kia unprovoked,” the court wrote. “The co-defendant’s statements, however, strike at the heart of that theory.”
By overturning his conviction, the court has forced the Trump administration to decide whether to reprosecute a case that began under President George W. Bush. The Nisour Square shooting strained diplomatic relations between Washington and Baghdad. The Bush administration refused to allow the contractors to be prosecuted in an Iraqi court, and implored angry and skeptical Iraqis to trust the American criminal justice system.
William Miller, a spokesman for the United States attorney in Washington, said prosecutors were reviewing the opinion and had no additional comment on Friday.
The ruling was the latest in a series of setbacks in the Nisour Square case, some of the government’s own making. Charges against one contractor were dropped in 2013 because of a lack of evidence. And, in an error that an earlier appeals court called “inexplicable,” the Justice Department missed a filing deadline and inadvertently let the statute of limitations expire against Mr. Slatten, who had been charged with manslaughter. That error forced prosecutors to charge Mr. Slatten with murder, which has no statute of limitations.
Retrying Mr. Slatten will not be easy. Prosecutors tracked down dozens of Iraqi witnesses and flew them to Washington for the first trial and would probably have to do so again. And the evidence against the group was stronger than the evidence against Mr. Slatten alone. If the Trump administration does not try him again, he will walk free. Mr. Slatten’s lawyer had no comment.
At their sentencing, the contractors predicted they would ultimately be exonerated. “The verdict is wrong,” Mr. Slatten told the judge. “You know I am innocent, sir.”
The four former Blackwater contractors had asked the court to overturn the convictions entirely, arguing that the Justice Department had no jurisdiction to bring charges for possible crimes committed in Iraq.
Federal law gives the Justice Department the ability to bring charges against contractors traveling with or supporting the mission of the Defense Department. Lawyers for the defendants argued that, as State Department contractors, the Blackwater guards were not covered by that law. The court disagreed.
After a series of congressional inquiries into Blackwater’s conduct, Mr. Prince ultimately sold the company. It has had several name changes and reorganizations since then and exists now as Academi, a subsidiary of the Constellis Group.