A military jury on Wednesday sentenced Major Nidal Hasan to death by lethal injection for killing 13 people and wounding 31 others at Fort Hood in Texas in November 2009.
The jury of 13 officers deliberated a little more than two hours before deciding the punishment.
Hasan, 42, an Army psychiatrist, admitted he was the gunman, but the BBC reports military law bans guilty pleas in death penalty cases.
He said he opened fire to protect Taliban fighters from troops about to deploy to Afghanistan.
His lawyers previously told the judge they suspect he is seeking execution in a bid for martyrdom.
The BBC reports the prosecution urged the jury to opt for the death penality.
''He will not now and he will never be a martyr," said prosecutor Colonel Mike Mulligan. "He is a criminal. He is a cold-blooded murderer."
The US military last executed a prisoner in 1961.