Experts on military law say that Major Hasan and his lawyers have very few cards to play. He is charged with 13 counts of premeditated murder and 32 counts of attempted premeditated murder, and he could face the death penalty. To get a capital conviction, the prosecution must show that he rationally planned out the killings beforehand, and that his actions were “premeditated and deliberated.”

“If you can create doubt that this was a planned series of killings, then you have a chance of defeating the level of murder that carries the death penalty,” said Geoffrey Corn, an expert on military law at South Texas College of Law in Houston.

Over three days, more than two dozen witnesses at the hearing described how Major Hasan shouted “Allahu akbar!” and then opened fire with a laser-guided handgun at a crowd of soldiers as they waited to see medical staff members before deployment. He gunned down one man who tried to hit him with a chair and chased another soldier out of the building to shoot him, witnesses said.

Major Hasan, a Muslim whose parents immigrated from the West Bank, fired first at a crowded waiting area, then he walked around and shot soldiers as they tried to hide under desks, chairs and tables, only pausing to reload and saying nothing after his first outburst, several witnesses said.

The air filled with gun smoke and people bled to death while others played dead to save their own lives. The laser guide from the gun cut across the smoky area searching for targets. Some sprinted for the only two exits when he was reloading. More than 100 shots were fired.

Several of the witnesses had survived multiple gunshot wounds.

Staff Sgt. Paul Martin recounted his attempts to escape, as he was hit first in the arm, then in the left leg after he dove to the floor. When he rose and tried to make it to the door, the gunman blocked his way and then shot him in the back as he ran to take cover behind an office partition.

“My legs went out from under me and I hit the floor,” Sergeant Martin said. “I thought ‘Oh God, I’m paralyzed.’ ” But the feeling came back to his feet, and he and a female soldier made it out together during another pause in the shooting.