The US soldier who murdered 16 Afghan villagers last year has been sentenced to life in prison without the possibility of parole.
Staff Sgt Robert Bales, 40, opened fire on men, children and women during the attack in Kandahar on 11 March 2012.
The father of two pleaded guilty in June to avoid the death penalty.
He apologised during his sentencing hearing at a Washington state military base on Thursday, calling the attack an "act of cowardice".
Sgt Bales had been making a case for why he should one day be eligible for parole, which would have meant he could have been released in 20 years.
But on Friday the military jury of six ruled against him at Joint Base Lewis-McChord, south of Seattle.
Sgt Bales showed no emotion as the sentence was announced. His mother bowed her head, rocked in her seat and wept.
An interpreter gave a thumbs-up to a row of Afghan villagers who were flown out by the US Army to give evidence at the trial.
But afterwards they were far from happy with the outcome.
"We wanted this murderer to be executed," Haji Mohammad Naeem, who was shot and injured in the attack, said through an interpreter.
"We came all the way to the US to get justice. We didn't get that."
He added: "I saw his [Sgt Bales'] mother trying to cry, but at least she can visit him. What about us? Our family members are actually six feet under."
Sgt Bales was serving his fourth combat deployment when he attacked two villages in the middle of the night, spraying bullets into mostly women and children.
His lawyers argued that post-traumatic stress disorder and a brain injury were factors in the killings.
Nine Afghan villagers testified at the court martial.
Among them was Haji Mohammad Wazir, who lost 11 family members, including his mother, wife and six children.
The jury returned the sentence just hours after the prosecution and defence made closing arguments.
'Darkness swallowed him'
Prosecutor Lt Colonel Jay Morse showed jurors photos of a young girl who was killed as she screamed and cried.
In his closing arguments, he showed surveillance video of Sgt Bales returning to his base with what he said was "the methodical, confident gait of a man who's accomplished his mission".
"In just a few short hours, Sgt Bales wiped out generations," Col Morse said. "Sgt Bales dares to ask you for mercy when he has shown none."
The prosecution focused on Sgt Bales' remark when he returned to base after the slaughter: "My count is 20," a reference to the number of people he apparently believed he had killed.
But defence lawyer Emma Scanlan read a letter the soldier sent to his children 10 weeks before the killing: "The children here are a lot like you.
"They like to eat candy and play soccer. They all know me because I juggle rocks for them."
She told the court: "These aren't the words of a cold-blooded murderer."
She also read from a letter sent by an Army captain who said that Sgt Bales seemed to have snapped from all his deployments.
"The darkness that had been tugging at him for the last 10 years swallowed him whole," it said.
The trial heard that Sgt Bales had a number of personal problems at the time of the attack: he had stopped paying his mortgage, was unhappy in his marriage and felt he had been passed over for promotion.