FORT HOOD — Military officials say the Fort Hood gunman blamed for killing three people and wounding 16 others before taking his own life was from Puerto Rico.
A spokeswoman for the Puerto Rico National Guard on Thursday said Ivan Lopez was from the U.S. territory and joined the island's National Guard in 1999.
Lt. Col Ruth Diaz says Lopez went on a peace and security mission to Egypt's Sinai Peninsula in the mid-2000s. He left the Puerto Rico National Guard in 2010 to join the U.S. Army.
At least three military personnel remain in critical condition after the shooting.
A spokesman for Scott & White Memorial Hospital in Temple on Thursday said three patients are critical and six are listed as serious.
A soldier opened fire at Fort Hood late Wednesday afternoon in an attack that left four people dead at America's largest Army installation. The gunman was among the casualties at the same installation where another soldier killed 13 people in 2009.
"The shooter is dead from a self-inflicted gunshot wound," Fort Hood commander Lt. Gen. Mark Milley said late Wednesday night, adding that 16 others — all members of the military — were injured.
"There is no indication that this incident is related to terrorism," he said.
Among the possibilities investigators planned to explore was whether a fight or argument on the base triggered the attack.
"We have to find all those witnesses, the witnesses to every one of those shootings, and find out what his actions were, and what was said to the victims," said a federal law enforcement official who spoke on condition of anonymity, because he was not authorized to discuss the case by name.
The official said authorities would begin by speaking with the man's wife, and expected to search his home and any computers he owned.
Texas Rep. Michael McCaul, chairman of the House Homeland Security Committee, identified the shooter as Ivan Lopez. Milley would not confirm that report.
The general said the exact sequence of events was not yet 100 percent clear. According to initial reports, the gunman walked into a unit building and opened fire. He then got into a vehicle, fired from the vehicle, walked into another building and opened fire again.
It was there he was confronted by military police and fatally shot himself in the head, Milley said.
Milley said the soldier used a .45-caliber Smith & Wesson pistol that had been purchased recently in the Fort Hood area.
Milley said the gunman served four months in Iraq in 2011 and was currently under diagnosis for post-traumatic stress disorder. He had been undergoing psychiatric treatment for depression.
A soldier told KENS-TV he heard at least 20 shots on post and saw at least one person hit by gunfire. Other soldiers were seen leaping a barbed wire fence after realizing that something was wrong.
"It's a terrible tragedy, we know that," Defense Secretary Chuck Hagel said. "We know there are casualties -- both people killed and injured."
Scott & White Hospital in Temple, the nearest trauma center to the sprawling military installation, said it had received four patients and was expecting two additional casualties. A spokesman characterized their injuries as ranging from stable to "quite critical."
President Obama said he was following reports from Fort Hood closely, and promised that the U.S. will get to the bottom of what happened.
"We're heartbroken that something like this might've happened again," Obama said at a restaurant in Chicago where he held a fundraiser.
Texas Gov. Rick Perry, in a written statement, said the first priority is caring for the victims and their families.
"Fort Hood has proven its resilience before, and will again," Perry said. "Texas will support those efforts in any way we can, with any resources necessary."
A lockdown of the base continued hours after the gunfire. All vehicles attempting to enter or leave the post were stopped and searched. Military families gathered at community centers to await further developments.
An "all-clear" siren finally sounded at 8:45 p.m., almost four hours after the shooting incident.
Central Texas College in Killeen was evacuating and canceling Wednesday night classes in response to the Fort Hood developments.
Fort Hood was the scene of a mass shooting in 2009 in which 13 people were killed and more than 30 wounded in what was the deadliest attack ever on a domestic U.S. military installation. Maj. Nidal Hasan was sentenced to death for the shooting rampage.
KVUE, KENS-TV, USA TODAY, ABC News, CNN and the Associated Press contributed to this report.