He was shot in the back by an officer and is paralyzed from the waist down.
Hasan spent weeks planning the attack, including buying the handgun and videotaping a sales clerk showing him how to change the magazine.
He visited a gun range outside Austin, where he asked instructors to teach him how to reload with speed and precision.
The instructor suggested Hasan turn off the lights and practice loading while sitting on a sofa under the low light of a television.
When he prepared his murderous rampage, Hasan avoided suspicion by stuffing paper towels in his pants pockets to muffle the sound of rattling ammunition as he entered the base.
Soldiers testified that Hasan reloaded his gun so rapidly it was impossible to stop him.
Investigators recovered 146 shell casings inside and outside the medical building. Many shells were found outside the building where Hasan shot fleeing soldiers in the back.
• This article is based in part on wire service reports.