A "heroic" female police officer confronted the war veteran who opened fire at the Fort Hood military base in Texas killing four and wounding 16 in an attempt to stop the shooting spree.
The officer was standing 20 feet away from suspected gunman Ivan Lopez, who had served in Iraq and was reportedly being treated for depression and anxiety, when she intervened to stop the shooting.
"He was approaching her at about 20 feet. He put his hands up, then reached under his jacket, pulled out the (gun) and she pulled out her weapon and then she engaged, and he put the weapon to his head," Lt Gen Mark Milley said late Wednesday.
"What she did was heroic," he added. "She did her job and she did exactly what we’d expect from US army military police."
The 34-year old was carrying a .45-caliber Smith & Wesson semi-automatic weapon when he stormed the military base in Texas. Four people were shot dead and 16 others were wounded in the attack.
Lopez first fired inside a building on the military base at 04:30am local time. He then drove to a second building and opened fire before he was confronted by the officer and put his gun on himself.
The events come just months after the trial of Major Nidal Malik Hasan, a radicalised Muslim-American army psychiatrist, who opened fire at a soldier readiness centre at Fort Hood in November 2009, shooting dead 13 people and wounding 32 others
President Barack Obama said he was "heartbroken" another shooting had occurred at the base, and told reporters the incident "reopens the pain of what happened at Fort Hood five years ago".
There was no motive given for the incident, and there is no indication that the soldier was involved with any "extremist organisations", according to US officials.