Washington (CNN) One former employee of the private Blackwater Worldwide security company was sentenced Monday to life in prison and three others to 30 years each behind bars for their roles in a 2007 mass shooting in Baghdad that left 17 people dead.

A federal jury convicted the four in October after a lengthy trial that saw some 30 witnesses travel from Iraq to testify against the security contractors. Prosecutors accused the men of illegally unleashed "powerful sniper fire, machine guns and grenade launchers on innocent men, women and children."

Senior U.S. District Court Judge Royce Lamberth sentenced Blackwater sniper Nicholas Slatten to a term of life in prison, mandatory for his first-degree murder conviction. Blackwater workers Paul Slough, Evan Liberty and Dustin Heard were sentenced to 30 year each, plus one day.

Slough was convicted of 13 counts of voluntary manslaughter, 17 counts of attempted manslaughter and a firearms offense. The jury convicted Liberty of eight counts of voluntary manslaughter, 12 counts of attempted manslaughter and a firearms offense. Heard was found guilty of six counts of voluntary manslaughter, 11 counts of attempted manslaughter and a firearms offense.

According to prosecutors, the four were among seven Blackwater employees who opened fire in the Nusoor Square traffic circle in Baghdad, killing 17 people.

An FBI investigation found 14 of the deaths unjustified, according to rules of engagement for private security contractors in Iraq. Slatten was accused of firing the first shots.

Blackwater said its convoy came under attack, and defense attorneys said in court that witness accounts were fabricated. But witnesses testified that the contractors opened fire without provocation.

"It was horror," said Hasan Jaber, an attorney who was driving to work when he was shot three times. "People running out of their cars were being shot at. ... Anything that moved in Nusoor Square was shot. Women, children, young people, they shot everyone."

Among the dead were two boys, 9 and 11, a doctor, a used car salesman, a truck driver, a businessman, an Iraqi soldier, a gardener, a taxi driver and an aspiring doctor taking his mother to an appointment, according to prosecutors.

The parents and brothers of the 9-year-old victim were present in court during the sentencing hearing and spoke.

Ali Razzaq's father looked at the defendants and yelled in broken English: "If I kill anyone in his family, what he do?! Today, we will see who will win, the law or Blackwater," he said. "Blackwater killed my son."

The defense presented character witnesses, family members and former colleagues who testified to the defendants' capacity to work under fire and willingness to help others. Each defendant also gave a closing statement.

Slatten addressed the court last, taking the opportunity to declare his innocence. Lamberth rejected his argument.

The judge said that the punishments reflected the seriousness of the crimes. He said that the U.S. government "should be commended for finding and exposing the truth of what happened."

A few gasps were heard in the courtroom, and some crying.

The case was initially dismissed in 2008 after a judge found the Justice Department withheld key evidence and violated the rights of the contractors. A federal appeals court reversed the ruling, paving the way for the two-month trial that ended in convictions for the four.

Another contractor, Jeremy Ridgeway, pleaded guilty in 2008 to voluntary manslaughter and attempt to commit manslaughter and testified for the government. He has not yet been sentenced.

Blackwater lost its $1 billion contract with the State Department to protect American diplomatic personnel in 2009, after the Iraqi government refused to renew the company's operating license.

The company was later renamed and sold, and now operates as ACADEMI, providing protection services and training.