KILLEEN, Texas (CNN) - A man opens fire at a military base, gunning down fellow soldiers before ending his own life. A hero steps in, trying to save lives. A community already scarred by war is left reeling, nearly five years after authorities vowed to improve security when another mass shooter struck there.
A day after a shooting rampage at Fort Hood, Texas, left three soldiers dead and 16 wounded, a key question looms over the investigation: Why?
The incident began Wednesday at about 4 p.m., when Spc. Ivan Lopez, 34, went from one building at the sprawling Texas military base to a second, firing his .45-caliber handgun.
Lopez then put the gun to his head and pulled the trigger, ending his life.
The gunman was an experienced soldier who was grappling with mental illness, officials said. But they haven't revealed any leads about a possible motive.
Investigators have downplayed the possibility that terrorism may have been involved, but said they were keeping open minds.
"Possible extremist involvement is still being looked at very, very carefully," Army Secretary John McHugh told the Senate Armed Services Committee.
McHugh did not name Lopez as the suspect, though other officials have.
The native of Puerto Rico enlisted in the Army as an infantry soldier and was deployed twice, including a four-month stint in Iraq as a truck driver, he said.
Lopez had arrived at the Texas base in February, moving with his wife and their daughter into an apartment a little more than a week before the shooting.
They appeared to be a normal couple, said neighbor Xanderia Morris. "They would smile whenever they'd see someone," she said.
Lopez had a history of depression, anxiety
But behind Lopez's smile lay a history of depression, anxiety and other psychiatric disorders, Lt. Gen Mark Milley, the post's commanding general, told reporters late Wednesday, and he was receiving treatment and taking antidepressants.
He had served for four months in Iraq in 2011. And while Army records don't show him as having been wounded there, Lopez himself reported that he had suffered a traumatic brain injury, Milley said.
And he was undergoing diagnosis procedures for post-traumatic stress disorder.
"He was not diagnosed, as of today, with PTSD," Milley said.
Arriving at a PTSD diagnosis, which is common among war veterans, can take time.
Lopez "had a clean record" behaviorally, McHugh added. There were "no major misbehaviors that we're yet aware of," he said.
Though he had been diagnosed with depression, anxiety and sleep disturbances, Lopez gave no sign during a psychiatric exam last month that he was likely to commit violence against himself or others, "so the plan (going) forward was just to continue to monitor and treat him as deemed appropriate," McHugh said.
Lopez had been prescribed the sedative Ambien, McHugh said.
His records "show no wounds, no direct involvement in combat ... or any injury that might lead us to further investigate battle-related TBI (traumatic brain injury)."
Officers picked up Lopez's widow at their apartment near the base in Killeen, and she was cooperating with law enforcement, an FBI official told CNN.
Lopez was an experienced soldier
Lopez served in the National Guard in Puerto Rico, and he left the Guard to join the U.S. Army, National Guard spokeswoman Ruth Diaz said Thursday.
Before coming to Fort Hood, Lopez served at Fort Bliss in Texas, a Pentagon official told CNN's Barbara Starr.
The official, who is familiar with Lopez's military record, said the soldier joined the National Guard in 1999, left the Guard as a specialist and joined the U.S. Army.
He carried out Wednesday's killings with his own gun -- a .45-caliber Smith & Wesson semiautomatic pistol he bought after arriving in Killeen.
By taking it onto the base, he was breaking the rules.
"If you have weapons and you're on base, it's supposed to be registered on base," Milley said. "This weapon was not registered on base."
In addition, people who are not military police are not allowed to walk around with guns on a military base. They are required to store them in an armory.
Sequence of events
Lopez walked into an administration building at the base and opened fire. He then got into a car, fired from the vehicle, got out of the car, walked into another nearby administration building and fired again.
Over 15 to 20 minutes, he killed three and wounded 16 -- all of them Army personnel, Milley said.
Three of the wounded were in critical condition early Thursday. Authorities did not say whether Lopez knew his victims.
The shootings took place in the medical brigade and the transportation battalion buildings. Lopez was assigned to the 13th Sustainment Command, which deals with logistics.
The base, which has more than 45,000 soldiers and nearly 9,000 civilian employees, went on lockdown.
People were told to shelter in place.
As sirens blared, Pvt. Dehlan Kay stayed in his barracks and talked on a phone. "I'm doing good," he told CNN's Wolf Blitzer. "I'm just a little nervous on what's happening."
The all-clear wouldn't go out for another six hours.
The shooting rampage ended when a military police officer confronted Lopez in a parking lot. "He put his hands up and reached under his jacket, pulled out the (gun), and she pulled out her weapon. And then she engaged, and then he put the weapon to his head, and he died of a self-inflicted gunshot wound," Milley said.
He added: "She did her job, and she did exactly what we would expect of a U.S. Army military police."
At the Lopez apartment, the shooter's wife was watching the news.
She came out crying, worried about her husband, from whom she had not heard all afternoon. But she had no idea that he was the shooter, said Morris, the neighbor.
"I'm just worried, I'm just worried," Lopez's wife told her.
"I tried to console her and comfort her, let her know everything was OK," Morris said.
It was not. When a local TV station identified the dead gunman as Lopez, his widow became "hysterical," Morris said.
It took law enforcement about 15 minutes to respond to the gunfire, Milley said.
Nine of the wounded were taken to Scott & White Memorial Hospital in nearby Temple, where three were in critical condition -- one with injuries to the neck, another to the spine and the third to the abdomen, said Dr. Matthew Davis, medical director of trauma services.
Two of the three were expected to require further surgery -- one of them on Thursday and the second likely on Friday, he told reporters. It was not clear whether the third would also require further surgery, he said.
Two of the remaining patients were in fair condition, and the rest were in good condition, with some of them possibly being discharged later in the day, he said.
The eight men and one woman range in age from early 20s to mid-40s, he said.
The wounds may heal, but "we clearly are going to have some physical scars and emotional scars going forward," he said. He predicted that the actions of a man who himself may have had PTSD will likely be responsible for others experiencing it.
"We'll have to work with some of our long-term professionals who help to work with PTSD," he said.
The previous mass shooter
In squeezing off his final shot, Lopez's actions differed from those of Fort Hood's last mass shooter.
Army Maj. Nidal Malik Hasan survived after killing 13 people and wounding another 32 on November 5, 2009.
Months later, the former military psychiatrist told a court that he was on a terrorist mission.
During a hearing in June, Hasan said that he fired at soldiers preparing to deploy to Afghanistan in order to protect leading members of the Taliban.
Hasan was convicted of 13 counts of murder and 32 counts of attempted murder, and a military jury recommended last August that he be put to death.
Both men bought their weapons at Guns Galore, a gun store in Killeen, according to U.S. law enforcement officials who have reviewed the records.
Lopez, who had no criminal history, passed the standard background check, they said, adding that the gun store did what was required.
A man who answered the phone Thursday at the store cited the ongoing nature of the investigation and referred a caller to local law enforcement. "We don't have anything to release," said the man, who would not identify himself.
The store also sold ammunition and gunpowder to Pvt. Jason Abdo, the AWOL soldier who was arrested in 2011 for plotting to attack a restaurant near Fort Hood while it was filled with soldiers and their families.
The plot unraveled when the store alerted authorities that Abdo seemed suspicious. He is serving a sentence of life in prison.
"My reaction was not 'not again here,'" Milley said in response to reporters' questions. "My reaction was to immediately make sure we had a read on the casualties. Immediately secure the site. Immediately look for one or more shooters."
But others saw the link.
"That was so similar, it just tore up my heartstrings," Staff Sgt. Patrick Zeigler told CNN's "New Day" on Thursday.
Zeigler, who is still recovering from four bullet wounds to the head and body from the 2009 Fort Hood shooting, expressed surprise. "It's just hard to believe that these people that you serve with, who are your brothers in arms, would turn against you," he said. "And it's just incredible that at home, someone in the environment of a military base would decide to do this."
He said security procedures will never suffice to deter someone bent on committing such an act. "It takes somebody brave enough to report these people in order for it to be prevented."
Army Chief of Staff Gen. Ray Odierno credited procedures that were put in place after the Hasan massacre for mitigating the carnage that could have resulted Wednesday.
The procedures and responses prevented "something that could have been much, much worse," he told the Senate Armed Services Committee.
But the recurrence weighed on Killeen Mayor Dan Corbin. "As a community, it's like you've been kicked in the gut," he said. "It can't be happening again."
No community should have to experience such violence once, let alone twice, said John Cornyn, a U.S. senator from Texas. "Tonight, Texans' hearts are once again very heavy. The scenes coming from Fort Hood today are sadly too familiar and still too fresh in our memories," he said Wednesday.
"We're heartbroken something like this might have happened again," said President Barack Obama, who was briefed by defense and FBI leaders by phone while traveling on Air Force One.
Fort Hood has been resilient before, Texas Gov. Rick Perry said.
The Department of Defense has the lead on the investigation of the shooting, with help from the FBI and state and local law enforcement personnel, White House press secretary Jay Carney told reporters Thursday.
By Tom Watkins, Ben Brumfield and Josh Rubin CNN's Joshua Rubin reported from Killeen, Texas; Ben Brumfield and Tom Watkins reported and wrote from Atlanta. CNN's Dana Ford, Steve Almasy, Nicole Dow, Greg Botelho, Evan Perez, Shimon Prokupecz, Pamela Brown, Brian Todd, Matt Smith, Barbara Starr, Dorrine Mendoza, Carma Hassan and Devon Sayers contributed to this report