Fort Hood shooting
Sgt. First Class Erick Rodriguez stands guard before a news conference by Lt. Gen. Mark Milley at the entrance to Fort Hood Army Post in Texas April 2, 2014. Reuters

An Iraq war veteran opened fire at the US army base in Fort Hood, Texas, killing three and injuring 16 before shooting himself to death.

The attacker, identified as Army Specialist Ivan Lopez, had served in Iraq for four months in 2011 and was undergoing evaluation and treatment for post-traumatic stress disorder.

He opened fire at one of the buildings in the compound around 4:30pm local time, after arriving at the scene in a vehicle. He fired random shots from inside the vehicle, and then got out of it, moved to another vehicle and started shooting with a .45-caliber Smith & Wesson semiautomatic pistol, the authorities said.

"There is no indication that this incident is related to terrorism."
- Lt  Gen  Mark A Milley, Fort Hood commanding officer

Lopez shot himself after a female military officer confronted him with a firearm.

Lt Gen Mark A Milley, Fort Hood's commanding officer, said the motive behind the shooting was not clear but it did not appear to be a terrorism-related attack.

"There is no indication that this incident is related to terrorism," Milley said, according to AFP.

Scott and White Memorial Hospital in Temple, Texas, where the victims were admitted, said four people were in critical condition.

The sprawling Fort Hood army base was the scene of the horrific killing of 13 soldiers and officers in 2009 by military psychiatrist-turned jihadist Major Nidal Malik Hasan.

President Barack Obama has expressed anguish over the latest attacks on the army base, adding that the events were being closely monitored.

"We are going to get to the bottom of exactly what happened ... We're heartbroken something like this might have happened again" Obama said.

Several agencies including the FBI, the Bureau of Alcohol, Tobacco, Firearms and Explosives, state police, local law enforcement and military police were all investigating the incident, AFP reported.

The chairman of the Joint Chiefs of Staff, Gen Martin E Dempsey, said the focus right now was on supporting the victims and their families. "This is a community that has faced and overcome crises with resilience and strength," he said.