KILLEEN, Tex. — Maj. Nidal Malik Hasan, the Army psychiatrist who admitted to killing 13 unarmed people at Fort Hood nearly four years ago, was sentenced to death by lethal injection by a jury on Wednesday, becoming one of only a handful of men on military death row.

Since the case against Major Hasan was overwhelming, his conviction was a near certainty, and the main question in the trial was whether he would receive the death penalty.

Prosecutors had from the start built a case for execution for an attack that a Senate report called the worst act of terrorism on American soil since Sept. 11, 2001. But Major Hasan, a Muslim, taunted the military justice system, refusing to put up a defense and suggesting in and out of court that death to him was but a means to martyrdom, leaving jurors to ponder whether to give him what he wanted.

His stance left the Army’s lead prosecutor, Col. Michael Mulligan, telling jurors during his closing argument on Wednesday morning that Major Hasan was not and never would be a martyr.