Baghdad (CNN) -- An Iraqi judge sentenced a British contractor to life in prison Monday, sparing him the death penalty.
Daniel Fitzsimons, 30, was charged with murder in the 2009 shooting deaths of two colleagues in Baghdad, in the first trial of a Westerner in Iraq since the Iraq War started in 2003.
He pleaded not guilty, telling a three-judge panel that he shot the two men in self-defense.
The judge who sentenced him said he didn't give him the death penalty "because you're still young and because of the circumstances of the crime," he said.
Fitzsimons smiled and thanked the judge when he heard the verdict Monday.
The victims were Paul McGuigan, a British national, and Darren Hoare, an Australian. Fitzsimons was also accused of the attempted murder of a guard.
The Iraqi guard, Arkan Mahdi, was wounded. He has the right to claim compensation in civil court, the judge ruled. Iraqi judges are not named for security reasons.
Fitzsimons's Iraqi lawyer, Tariq Harb, said he was "very happy with the court decision."
But Salam Abdulkarim, who represents the families of the victims, said Fitzsimons had committed an ugly crime and according to Iraqi law, he should get the most extreme punishment.
A spokesman with the British Embassy in Baghdad said it was a matter for Iraqi law.
"This was a decision made by the Iraqi court. We respect the independence of the Iraqi judicial system, the court verdict and the sentence," the spokesman said.
Fitzsimons complained during the trial that the court would not let him talk about his post-traumatic stress disorder.
The court issued two delays in order to get a health committee report on PTSD. Fitzsimons had previously been diagnosed with the disorder in Britain, but his lawyer had argued that the disorder was new to Iraq.
The trial comes after security contractors lost their immunity following the U.S.-Iraq security agreement that went into effect in January 2009.
Before that, Iraqis had complained that private security contractors were operating in a state of lawlessness, never held accountable by Iraqi authorities for incidents in which Iraqis were killed.
According to Fitzsimons' testimony, after a night of drinking, he got into a fight with McGuigan that lasted on and off for more than an hour.
He then left, but was later attacked by McGuigan and Hoare, and he shot them in self-defense, he told the court. At one point, one of the judges told him that his version didn't match some of the evidence.
Under Iraqi law, murder is punishable by hanging.