A federal judge on Thursday reduced the sentences of three ex-Blackwater security contractors who opened fire at a traffic circle in Baghdad, Iraq, in 2007, killing 14 unarmed civilians and injuring 17 others.

U.S. District Judge Royce Lamberth sentenced Paul Slough, Evan Liberty and Dustin Heard to 15 years, 14 years, and 12 years and seven months, respectively. The trio had received 30-year sentences in 2015 after being convicted the previous year on charges including voluntary manslaughter and attempted manslaughter. The sentences were the mandatory punishment for the commission of a felony while using a military firearm.

A fourth contractor, Nicholas Slatten, was sentenced to life in prison after being convicted in the same trial of first-degree murder.

EX-BLACKWATER CONTRACTOR SENTENCED TO LIFE FOR 2007 IRAQ SHOOTINGS THAT KILLED 14

In 2017, an appeals court overturned the 30-year sentences for Slough, Liberty and Heard, ruling that the punishment was excessive and unjust and was intended for gang members and drug traffickers -- not military contractors who had essentially been deputized by the U.S. government. The judges also overturned Slatten's conviction and ruled that he should have been tried separately from the other three.

SERVICE MEMBER KILLED DURING MISSION IN IRAQ, US MILITARY SAYS

The men claimed they thought they were under attack at the time. The shooting killed 10 men, two women and two boys, 9 and 11 years old. Prosecutors said Slatten was the first of the four contractors to fire. His attorneys said he mistakenly believed a suicide car bomber was approaching their convoy.

Slatten was convicted in December at his second retrial after the jury couldn’t reach a unanimous verdict in the first retrial. He was once again sentenced to life in prison last month.

CLICK HERE TO GET THE FOX NEWS APP

The shooting sparked tensions between the U.S. and Iraq and focused intense international scrutiny on the extensive use of private military contractors in Iraq. Slatten’s supporters maintained that he was being prosecuted as a government scapegoat to cover up the increased use of private military contractors in Iraq at the time.

Fox News’ Vandana Rambaran and The Associated Press contributed to this report.