A federal judge Monday sentenced a former Blackwater Worldwide security guard to life in prison and three others to 30-year terms for killing 14 unarmed civilians in a Baghdad traffic circle in 2007, an incident that fomented deep resentments about the accountability of American security forces during one of the bloodiest periods of the Iraq war.

U.S. District Judge Royce C. Lamberth of the District rejected a claim of innocence by Nicholas A. Slatten, 31, of Sparta, Tenn., who received the life sentence after being convicted of murder in October for firing what prosecutors said were the first shots in the civilian massacre.

The three others — Paul A. Slough, 35, of Keller, Tex.; Evan S. Liberty, 32, of Rochester, N.H.; and Dustin L. Heard, 33, of Maryville, Tenn. — were sentenced to 30 years plus one day after being convicted of multiple counts of manslaughter and attempted manslaughter.

All the defendants vowed to appeal what one called a “perversion of justice,” saying they fired in self-defense in a war zone and a city that was then one of the world’s most dangerous places.

Lamberth, a Ronald Reagan appointee and former Army captain, said the defendants, all U.S. military veterans, “appear overall to be good young men who have never been in trouble,” but commended the U.S. government for “finding and exposing the truth of what happened in Nisour Square” on Sept. 16, 2007.

1 of 20 Full Screen Autoplay Close Skip Ad × Blackwater guard sentenced to life in prison for 2007 Iraq deaths View Photos American security contractors killed 14 unarmed Iraqis by firing machine guns and grenades into a Baghdad traffic circle, one of the most ignominious chapters of the Iraq War. Caption American security contractors killed 14 unarmed Iraqis by firing machine guns and grenades into a Baghdad traffic circle. April 13, 2015 Supporters of Blackwater guards gather outside the E. Barrett Prettyman U.S. Courthouse in Washington. The four Blackwater guards were sentenced for 2007 shootings that killed or injured 31 unarmed Iraqis in Baghdad. Astrid Riecken/For The Washington Post Buy Photo Wait 1 second to continue.

The government entrusts service members and contractors with deadly weapons and provides them with training to use them only when necessary and justified by the circumstances, Lamberth said.

“It is clear these fine young men just panicked,” Lamberth said. “The overall, wild, thing that went on here can just not be condoned by a court. . . . A court has to recognize the severity of the crimes committed, including the number of victims.”

During the 10-week trial, Lamberth said, no witness testified they saw the guards come under fire, nor was evidence found that AK-47 rifles carried by Iraqi insurgents were used at the time.

The sentences delivered the government a long-sought legal victory in the aftermath of one of the lowest points of the Iraq war, in which the Blackwater name — then one of the country’s most profitable and politically connected security firms — became shorthand for unaccountable U.S. power.

Prosecutors said the four defendants, among 19 Blackwater guards providing security for State Department officials in Iraq, fired machine guns and grenade launchers in a reckless and out-of-control way after one of them falsely claimed that their convoy, called Raven 23, was threatened by a car bomber.

The guards said that they acted in self-defense after coming under AK-47 gunfire as they cleared a path back to the nearby Green Zone for another Blackwater team that was evacuating a U.S. official from a nearby car bombing.

Officials with the Justice Department and the FBI field office in Washington said the prosecution reflected the American justice system’s commitment to the rule of law and expressed hope that the results would bring some comfort to victims and their survivors.

A federal judge sentenced four former Blackwater security guards in the 2007 massacre of 14 unarmed Iraqis in a Baghdad traffic circle. (Reuters)

“In killing and maiming unarmed civilians, these defendants acted unreasonably and without justification,” the U.S. attorney’s office for the District said in a statement. “In combination, the sheer amount of unnecessary human loss and suffering attributable to the defendants’ criminal conduct on Sept.16, 2007, is staggering.”

The sentencing came after an emotional, day-long hearing in a courtroom packed with 100 family members and supporters of the defendants, who appeared in leg cuffs and blue jail jumpsuits, as well as Justice Department lawyers, former jurors and relatives of the shooting victims.

Attorneys for Slough, Liberty and Heard criticized prosecutors’ decision to charge them with using military firearms while committing a felony, an offense that carries a mandatory minimum sentence of 30 years in prison, twice as long as a manslaughter conviction.

The charge has primarily been aimed at gang members, rarely against police officers accused of misconduct and never before against security contractors given military weapons by the U.S. government.

“I feel utterly betrayed by the government I honorably served,” Slough said. “I have faith I will be exonerated in both this life and the next.”

Like the others, he maintained his innocence. Heard, who did not testify at the trial and spoke for the first time before the judge, said, “I am very sorry for the loss of innocent life. But I cannot say in all honesty to the court that I believe I did anything wrong.”

In a brief statement, Liberty added, “I don’t want to spend any more time in jail. As God is my witness, I shot at two people that day, who were dressed in Iraq police uniforms and they were shooting at me.”

“The system failed in this case,” Brian M. Heberlig, the head of Slough’s defense team at the Steptoe & Johnson law firm, said in a statement. “It was impossible for a civilian jury in peacetime Washington, D.C., to understand the extreme mortal threats that Paul and his colleagues faced on a daily basis and in the Baghdad traffic circle that day.”

Thomas Connolly, an attorney for Slatten, said he would appeal the verdict as the result of a vindictive prosecution, adding that prosecutors chose the nation’s capital to try the case, where he said jurors had “ambivalence toward gun culture, and ambivalence toward the military.”

Mohammed Kinani, 43, formerly of Baghdad but now a U.S. green-card holder living in Michigan, was the government’s first witness, testifying about the death of his 9-year-old son, Ali Mohammed Hafedh Abdul Razzaq.

In the courtroom, Kinani called the sentencing a test of “who wins, the law or Blackwater.” Afterward, he thanked the U.S. military for trying to liberate his country and the justice system for showing “how fair the law is and that it applies to everyone. My mission is done.”

Prosecutors had sought terms of 47 to 52 years for the men, in addition to life for Slatten.

Lamberth instead adopted a package that sentenced the three others to time served for manslaughter and attempted manslaughter, as defense attorneys sought, but did so saying he expected that he could re-sentence them if higher courts reject the applicability of mandatory 30-year term for the firearms charge.

Before the sentencing, Christin Slough, 34, the wife of Paul Slough, said relatives had been constrained to keep quiet during legal proceedings but now would speak out against what they believe is an unjust prosecution.

“For seven years, this has been about seeking a conviction, not the truth. We are not going to be silent anymore,” said Slough, of Sanger, Tex. Slough and relatives of the other men have created a Web site, Supportraven23.com, seeking to build public support.

Supporters of the men held out hope for other forms of relief. They cited the cases of Jose A. Compean and Ignacio Ramos, two former Border Patrol agents who served more than two years in prison before President George W. Bush commuted their sentences shortly before leaving office in 2009.

The government brought civilian charges in 2008 against six other Blackwater employees. One, Jeremy Ridgeway, pleaded guilty to manslaughter, testified against the others and still faces sentencing. Charges were dropped against another man, Donald Ball. Three other members of the Blackwater team were granted limited immunity by the government to testify against their former colleagues.

The security firm’s founder, Erik Prince, eventually left the company, which was renamed Xe Services, then later sold and renamed Academi.