A military court has sentenced United States Army psychiatrist Nidal Malik Hasan to death for killing 13 people and wounding 32 others in a 2009 shooting rampage at Fort Hood, Texas, considered the deadliest attack on a domestic military base in American history.
The 13-member jury, which convicted Hasan and sentenced him to death on Wednesday, also stripped him of his military pay, which he had continued to receive while awaiting trial.
He was also dismissed from the army.
He will be transferred to a military prison at Fort Leavenworth, Kansas, on the first available military flight, officials said.
With a calm expression and dressed in army fatigues, Hasan listened impassively as the death penalty was handed down by a panel of 13 senior military officers in a unanimous decision.
The jury deliberated for a little more than two hours.
Hasan, who will be 43 next month, was found guilty on all 13 counts of premeditated murder and 32 of attempted premeditated murder.
He had opened fire on November 5, 2009, at Fort Hood's Soldier Readiness Processing Centre, where troops were getting medical check-ups before their deployment to Afghanistan.
The army psychiatrist, who was scheduled to leave for Afghanistan a few weeks later, targeted the soldiers with a high-powered, high-capacity handgun he had fitted with laser sights.
Twelve of the dead and 30 of the wounded were soldiers.
Hasan was shot by a civilian police officer who responded to the attack. He is now partially paralysed.
Prosecutors aggressively pursued the death sentence during the 22-day court-martial, calling more than 100 witnesses, including 20 surviving victims and relatives of the deceased, to testify in a courtroom just a few miles from the site of the shooting.
During two days of sentencing evidence, they described, in often emotional testimony, how the incident had changed their lives.
Staff Sergeant Patrick Zeigler, who was shot four times, told the court, "I was expected to either die or remain in a vegetative state."
Zeigler's left side remains partially paralysed. He said that his personality has changed as he is "a lot angrier, a lot darker than I used to be."
The court heard that Hasan had carefully planned his attack, training at a local firing range and researching jihad on his computer.
The Federal Bureau of Investigation and the department of defence have attracted criticism for failing to prevent the attack after missing a number of warning signs.
Hasan acted as his own defence attorney in the court-martial trial, which has presented complicated legal issues to the military court.
Earlier this summer, Hasan was rumoured to be contemplating pleading guilty to all charges -- but military law forbids guilty pleas in cases that involve the death penalty.
After military prosecutors rested their case last Tuesday, Hasan rested his case a day later, without calling any witnesses or engaging in any substantial questioning of witnesses.
Earlier, he has said that he "switched sides" and turned against the United States because of its military actions in Iraq and Afghanistan.
"I would like to agree with the prosecution that it wasn't done under the heat of sudden passion," Hasan told the judge in the case. “There was adequate provocation -- these were deploying soldiers that were going to engage in an illegal war."
During the penalty phase of the trial this week, Hasan rested his case shortly after the prosecution had completed its presentation.
The US military performed its last execution of an active-duty soldier in the early 1960s.