The soldier accused of opening fire at Fort Hood, killing three people and wounding 16, was an Iraq war veteran who was battling an array of mental health issues and taking medications, military officials said today.
Spc. Ivan Lopez, a 34-year-old soldier in the Army, was "undergoing a variety of treatments and diagnoses of mental health issues ranging from depression to anxiety to sleep disturbance," Army Secretary John McHugh said today.
He had not been diagnosed with post traumatic stress disorder but was undergoing a diagnostic process to determine if he had it, officials said. Lopez's mental health has become a focus of the investigation into why he opened fire on the base Wednesday afternoon.
According to authorities, Lopez brought onto the base a semi-automatic, .45 caliber Smith & Wesson handgun he recently purchased but not registered with the Army.
Sources familiar with the investigation tell ABC News the gun used in Wednesday's Ft. Hood shooting was purchased at Guns Galore in Killeen, Texas. This is the same store where Nidal Hasan purchased the gun he used in 2009 massacre on the base.
Around 4 p.m., he walked into a command building and opened fire, then left, got in his car and began driving while still firing shots. He got out of his car and walked into another building, still shooting.
Three individuals were killed and 16 were injured in the rampage, officials said. All were members of the military. Three people are still in critical condition, with injuries to the neck, spine, and abdomen, respectively, while the others are stable.
Once inside the second building, Lopez was confronted by an armed military policewoman. He briefly put his hands in the air, but then reached for his gun and shot himself, according to Lt. Gen. Mark Milley, senior officer at the base.
Milley praised the officer who confronted Lopez.
"It was clearly heroic, what she did at that moment in time," Milley said.
Authorities are investigating whether an argument on or near the Texas base might have sparked the mayhem, sources tell ABC News.
McHugh said today that Lopez was a native of Puerto Rico, where had served in the National Guard for nine years before enlisting in the Army in 2008. He had served in Sinai with the National Guard and then as a truck driver when he was deployed to Iraq, where he replaced another soldier and finished out that soldier's deployment for four months.
Lopez is married and lived with his wife, also a native of Puerto Rico, and young daughter off base.
Xanderia Morris, who lives near the Lopez family in Killeen, said Lopez's wife walked outside, looking distraught as news of the shooting spread.
"She told me that she hasn't talked to [her husband] since 3 o'clock and was hysterical," Morris said. "She was shaking and crying."
The shooting details were especially surprising for Morris because, she said, Lopez seemed normal, a devoted husband and father.
"He was always smiling and waving whenever I saw him, so I didn't think anything strange or unusual," she said.
A senior military official told ABC News that Lopez reported to the military last summer that he was suffering from a traumatic brain injury and was having trouble sleeping.
He had been seeing a psychiatrist as recently as last month, McHugh said, but Lopez had not shown any signs of likely violence toward himself or others. He had not been suicidal. The psychiatrist's had planned to continue monitoring and treating him. The only medication that officials said publicly that he was prescribed was the sleep aid Ambien.
Wednesday's violence brought back sharp memories of November 2009, when Army psychiatrist Maj. Nidal Hasan opened fire inside Fort Hood, killing 13 people. He was convicted and sentenced to death in August.
"Obviously, this reopens the pain of what happened at Fort Hood five years ago," President Obama said during an impromptu appearance before reporters inside the Chicago Cut Steakhouse.
"We know these families. We know their incredible service to our country and the sacrifices that they make," he said. "Obviously, our thoughts and prayers are with the entire community, and we are going to do everything we can to make sure the community of Fort Hood has what it needs to deal with a tough situation, but also any potential aftermath."
Gen. Ray Odierno said today that the procedures put in place after the 2009 shoot "did help us yesterday," and cited the alert procedures, the response and the training of response forces as preventing Wednesday's shooting from "something that have could have been much worse."
ABC News' Jack Date, Pierre Thomas, and Mike Levine contributed to this report.