Washington (CNN) -- A soldier being examined for possible post-traumatic stress disorder buys a gun off base and fails to register it with a commander, as required.
Now Spc. Ivan Lopez is dead, along with three others, in the second major shooting at Fort Hood in less than five years.
Changes implemented after the 2009 massacre in which Maj. Nidal Hasan killed 13 people and injured dozens resulted in a better response by military police to Wednesday's incident at the sprawling Texas military base, Army Chief of Staff Gen. Ray Odierno told a Senate panel.
However, few immediate answers emerged about how the military can prevent someone undergoing psychiatric evaluation from illegally bringing a firearm on base.
It is one of several recurring security questions involving military bases, particularly Fort Hood, the nation's largest Army base and scene of the 2009 attack as well as the 2011 arrest of an Army private who tried to build a bomb to blow up troops stationed there.
"Something went wrong"
"As we watched some of the events unfold yesterday, we saw some of the benefits and gains made out of that first Fort Hood experience," Army Secretary John McHugh told the Senate Armed Services Committee on Thursday. "But something happened, something went wrong, and we need to know what that was."
The problem is not limited to Fort Hood. Last year, a gunman with access to the Washington Navy Yard in the nation's capital killed 12 people before police shot him to death.
Steps taken in response to the 2009 Fort Hood shootings included creating a kind of "neighborhood watch" to teach the Army community to recognize and report suspicious behavior, as well as plans to educate commanders on signs of workplace violence, and an enhanced 911 system.
Odierno said training for how to respond to a live shooter situation, including alert procedures, helped prevent Wednesday's violence from being "much, much worse."
A resident at the base, Lynn Adams, said authorities check identification and other things, but overall, "there hasn't been a whole lot of extra protection on base" in the aftermath of the 2009 killings.
After Wednesday's latest Fort Hood shootings, military and security analysts distinguished between the specific issue of security at the Army base and the broader debate over federal and state gun control laws.
Lopez legally purchased a .45 caliber handgun at a gun store in Killeen, where Fort Hood is located, sources told CNN. He then took the weapon onto the base, which violated military regulations because he didn't register it there.
Two issues involved
Those are two distinct steps -- one involving background checks of people seeking to buy firearms and the other about security protocols at the base where more than 50,000 people live and work each day, noted former FBI Assistant Director Tom Fuentes, CNN's law enforcement analyst.
"This is not a U.S. penitentiary," Fuentes said of Fort Hood. "They're not going to search every car, every trunk, pat down every person going through there. It's a city. It's a working city."
He also noted the base includes soldiers preparing for combat deployment, meaning "you have an extra percentage of the population that are trained to kill, if you will."
"So this is to be expected," Fuentes said. "We don't want it to happen and we say we're going to do everything to stop it from happening, but we're just fooling ourselves. It's not going to be completely eliminated. There's not everything you can do to completely stop this on military bases or in any other city for that matter."
Killeen Mayor Dan Corbin shared that opinion, telling CNN that "there's no way that we could be ... 100% certain that someone doesn't have a gun at Fort Hood."
"That's logistically impossible," Corbin added.
A 1993 ban on private weapons at military bases got expanded at Fort Hood following the Hasan killings, making Lopez's possession of his handgun on the base illegal.
In response to Wednesday's shootings, which also injured 16 people including three critically, Republican Rep. Steve Stockman of Texas called for ending the restrictions.
Let soldiers carry weapons on bases?
"This is the third mass shooting on a military base in five years, and it's because our trained soldiers aren't allowed to carry defensive weapons," Stockman said. "Anti-gun activists have turned our military bases into soft targets for killers."
Odierno, however, said Thursday that the armed military police and other base security personnel provided enough protection.
"Although we carry arms quite regularly overseas when we we're deployed on a regular basis, I believe back here in the United States, it's more appropriate that we leave it to that," he said in response to a question from GOP Sen. Lindsey Graham of South Carolina.
Republican Rep. Peter King of New York earlier told CNN that his military experience showed the benefit of preventing ordinary soldiers from having firearms on base.
"You have a situation where in a barracks on Saturday night, you may have arguments, fights," King said, adding that military brass should talk to "the sergeants, the NCOs, the officers and people on the ground" about the effect that access to firearms could have on regular order and discipline before making any change.
King and others called instead for better screening of possible mental illness among troops, a major issue for the military dealing with the impact of the Iraq and Afghanistan wars.
Lopez had a history of depression, anxiety and other psychiatric disorders, and was receiving treatment and taking antidepressants, according to military officials.
"At the end of the day, it's not going to be about the gun necessarily, it's going to be about the soldier and the care that he should have gotten that he wasn't getting, or somebody knew," said retired Army Lt. Gen. Russel Honore. "At the bottom, there's a sergeant that knows that there's something wrong with that soldier, that he needed more help. At the bottom of this, there's a captain that knows."
Continuity of care
CNN Military Analyst James "Spider" Marks, a retired major general, noted that Lopez had been transferred from another military base to Fort Hood two months ago, which broke the continuity of any care he received for his mental issues.
"You wouldn't have done that with a soldier who was undergoing some other type of physical, visible ailment. You would have left that young soldier where he or she was," Marks said, adding that "I think that is a part of this process that needs to be evaluated as well."
Odierno said the Army does "quite significant screening today, but it doesn't mean it's right and it doesn't mean we can't improve it."
"We have to constantly evaluate this," he told the Senate panel. "This is something that we are going to have to deal with for a very long period of time, and that's the consequence of 13 years of war."
The broader issue of U.S. gun laws raises more volatile and irreconcilable differences.
"This is yet another story, a person with psychiatric problems walking into a gun shop and being able to obtain a weapon and ammunition and go shoot who he wants," Fuentes said. "There's no indication of any political will to change that situation, so we'll just have to deal with it as it comes."
To emphasize his point, he noted how proposals for tougher gun laws failed to pass Congress after the 2012 killings in Connecticut of 20 first-graders and six educators by a 20-year-old man with known mental health issues who had access to family firearms.
"If a massacre of children doesn't change situations like that, this certainly won't," Fuentes said.
Gun control debate
However, Republican Rep. John Carter of Texas called the state's current system of background checks adequate, and Corbin, the Killeen mayor, warned that increasing restrictions could cause unintended consequences.
"If we impose restrictions on the ability to carry or get a concealed handgun permit because someone is starting to seek help for problems they have, that could serve as a disincentive and keep people from seeking treatment," Corbin told CNN.
A CNN/ORC International poll in November, as the first anniversary of the Connecticut school shootings approached, showed the nation evenly split on the issue.
In Washington, House Speaker John Boehner told reporters on Thursday that "there's no question that those with mental health issues should be prevented from owning weapons or being able to purchase weapons."
He touted funding for pilot programs studying the matter in legislation passed by Congress, calling the issue something "we need to continue to look at to find a way to keep weapons out of the hands of people who should not have them."
CNN's Dana Bash, Barbara Starr, Faith Karimi and Steve Almasy contributed to this report.