Unstable mental health may be the "fundamental, underlying cause" of a soldier's shooting rampage at Fort Hood, though an argument with another service member probably preceded the attack, according to investigators.

Specialist Ivan Lopez turned his gun on himself after killing three people and wounding 16 others on Wednesday at the sprawling Texas military base, where more than a dozen people were killed by a soldier in 2009.

Lopez, an army truck driver from Puerto Rico, was undergoing treatment for depression and anxiety while being evaluated for post-traumatic stress disorder, base officials said.

Lt Gen Mark Milley, senior officer at the nation's largest army base, said there was a "strong indication" that Lopez was involved in an argument shortly before the shooting, though it does not appear he targeted specific soldiers during the attack. Investigators are also focusing on his mental health.

"We have very strong evidence that he had a medical history that indicates unstable psychiatric or psychological condition," Lt Gen Milley said. "We believe that to be a fundamental, underlying cause."

Lopez had reported to medical personnel that he had suffered a traumatic brain injury. The 34-year-old served four months in Iraq but saw no combat, and he had previously demonstrated no apparent risk of violence.

He seemed to have a clean record that showed no ties to potential terrorists, though military officials said the investigation was ongoing.

"We're going to keep an open mind and an open investigation," army secretary John McHugh said on Thursday in Washington, explaining that "possible extremist involvement is still being looked at very, very carefully".

Lopez saw a psychiatrist last month and showed no "sign of any likely violence either to himself or others", Mr McHugh said.

Three of the wounded in Wednesday's shooting remained in a serious condition at Scott & White Memorial Hospital in nearby Temple.

Investigators searched Lopez's home on Thursday and questioned his wife, who declined to comment.

Lopez walked into a base building at around 4pm on Wednesday and began firing a .45-calibre semi-automatic pistol. He then got into a vehicle and continued shooting before entering another building on the army post. He was eventually confronted by military police in a car park and shot himself, Lt Gen Milley said.

Lopez bought the weapon he used in the attack at Guns Galore in Killeen - the same store, just off the base, where army psychiatrist Nidal Hasan purchased an FN 5-7 tactical pistol that he used to kill 13 people and wound more than 30 others in a November 2009 shooting on the base.

After that shooting - the deadliest attack on a domestic military installation in US history - the military tightened base security nationwide.

Lopez grew up in Guayanilla, a town of fewer than 10,000 people on the south-western coast of Puerto Rico.

Lopez joined the island's national guard in 1999, and he served on a year-long peacekeeping mission in Egypt's Sinai Peninsula in the mid-2000s. He enlisted with the army in 2008 and arrived at Fort Hood in February from Fort Bliss, another Texas base.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.