Updated

Fort Hood gunman Ivan Lopez may have had angry words with fellow soldiers before opening fire on the military base and killing three, wounding 16 and then turning the gun on himself, an Army official said Thursday.

Lopez, an Army specialist from Puerto Rico who had been treated for mental problems, was stopped when a Military Police officer confronted him, her gun drawn. Otherwise, the massacre could've been far worse, said Army Lt. Gen. Mark Milley, who was unable to ascribe a motive to the shooting.

"We’re trying to figure out what the trigger event was," Milley told reporters, saying investigators are working to determine whether the shooting was pre-meditated.

A “verbal altercation” with another soldier or soldiers may have “immediate preceded shooting,” Milley said, adding that there are “strong indications” that’s what sparked the shooting.

"At this point we have not yet ruled out anything whatsoever," Milley said. "We have no indications at this time of any links to terrorist organizations of any type – national or international."

More On This...

Lopez, a married father of four, had only been assigned to Fort Hood earlier this year, working as a truck driver. But Lopez posted a chilling update on his Facebook page, accusing two men of robbing him and possibly hinting that he was on the brink of snapping, Fox News Latino reported.

"I have just lost my inner peace, full of hatred, I think this time the devil will take me," Lopez wrote in the March 1 post.

Edgardo Arlequin, the mayor of Lopez’s hometown of Guayanilla, Puerto Rico, told Fox News Latino Lopez had been distraught over the deaths of his mother and grandfather within a two-month period five months ago. Arlequin said that the Army initially denied Lopez permission to travel to Puerto Rico to attend his mother’s funeral, but later gave him 24 hours to attend.

Lopez, who served four months in Iraq and who was previously assigned to Fort Bliss, received several awards during his nine years of service, according to the military record obtained by Fox News.

Lopez was armed with a .45 caliber Smith & Wesson and turned the gun on himself when confronted by a female military police officer in a parking lot of the base, near Killeen, Texas. Lopez, who had served four months in Iraq in 2011, was married with four children and had arrived at Fort Hood in February.

Earlier Thursday, Secretary of the Army John McHugh said records show Lopez, who was a military truck driver in Iraq, suffered no wounds during his deployment there. McHugh testified Thursday at a Senate Armed Services Committee hearing, during which he said Lopez was undergoing a variety of treatment for psychiatric issues, ranging from depression to anxiety to sleep disturbances. He said Lopez was taking "a number of drugs," including Ambien, for these conditions, and that he had seen a psychiatrist just last month. McHugh said there were no indications during that examination that Lopez showed any "sign of likely violence."

Milley said Wednesday that Lopez had been undergoing an assessment to determine whether he had post-traumatic stress disorder. According to officials, Lopez, who served in the Army for nine years, went on two deployments overseas -- the first to Egypt in 2007 and the second to Iraq in 2011. Lopez was currently assigned to the 49th Transportation Battalion (Movement Control), 13th Sustainment Command (Expeditionary).

Several of those wounded during the shooting were transported to Scott & White Memorial Hospital. Dr. Matthew Davis, the hospital's trauma director, said Thursday that six patients had been discharged, but three remain in critical condition -- with wounds to the neck and abdomen and a potential spine injury. While Davis would not comment further on the status of those victims, he said, "We don’t expect any more fatalities at this point." The patients at Scott & White Memorial range in age from 21 to 40, Davis said.

During Thursday's press conference, Milley credited the unnamed female soldier for helping to prevent more people from being shot during the attacks.

"She clearly performed her duty exceptionally well," he said.

Wednesday's attack came at the same base where in 2009 U.S. Army Maj. Nidal Hasan killed 13 and wounded 30, and renewed debate about the military's policy of not allowing soldiers on bases to carry personal or concealed weapons. Critics of the policy say it leaves service members and civilian employees vulnerable to such attacks.

“We need to harden our military bases so this can’t happen, and one possible way to do that is to allow our veterans and active duty military … to carry weapons,” said McCaul.

Army Sgt. Howard Ray, who survived the 2009 attack, added, “When our soldiers are unarmed they will find themselves in a situation like yesterday and in 2009.”

Wednesday's gunfire began around 4 p.m. local time and occurred in two buildings at the post, the scene of a 2009 shooting that left 13 soldiers dead.

Lopez bought his gun last month from the same store where Hasan purchased his weapon in 2009, a law enforcement source told Fox News. There is no indication at this time that the gun dealer did anything wrong, according to the source.

In addition to possible stress over his mother's death, Lopez had reportedly complained about suffering a traumatic brain injury after his return from Iraq.

An FBI official told Fox News there was no indication Lopez was motivated by any religiously-fueled ideology.

Late Wednesday, investigators had already started looking into whether the gunman's combat experience caused lingering psychological trauma. Among the possibilities they planned to explore was whether a fight or argument on base triggered the shooting.

"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," a federal law enforcement official told The Associated Press, speaking on condition of anonymity because he was not authorized to discuss the case by name.

The official said authorities would begin by speaking with Lopez's wife and also expected to search his home and any computers he owned.

President Obama said the U.S. government will get to the bottom of what happened in the shooting and expressed his condolences to the families affected by the massacre.

"To see unspeakable, senseless violence happen in a place where you’re supposed to feel safe is tragic," Obama said at the White House on Thursday. "Every single one of them was an American patriot."

"We stand with their families and loved ones as they grieve. We are thinking about those who are wounded," he said.

When gunfire was reported on the base Wednesday, Bell County Sheriff's deputies and troopers from the Texas Department of Public Safety were sent to the scene, Bell County Sheriff's Office Lt. Donnie Adams said.

Fort Hood officials ordered everyone at the base to "shelter in place." The order was sent on the base's Twitter feed and posted on its Facebook page.

The 1st Calvary Division, which is based at Fort Hood, had sent a Twitter alert telling people on base to close doors and stay away from windows.

In 2009, Hasan, a psychiatrist who had become a radical Muslim while serving in the military, opened fire inside the Army post in Killeen, Texas. Hasan, who represented himself at a military trial after clashing with his appointed attorneys, was sentenced to death in August.

Lisa Pfund told WFTX-TV her daughter Amber was shot during the 2009 attack and praised as a hero for helping wounded soldiers to safety. She said Wednesday's shooting brought back a flood of emotions.

"I went on Facebook and I thought not again," Pfund said. "It shouldn't have happened again. I thought things were put in place where it wouldn't happen again."

After the 2009 shooting, the military tightened base security nationwide. That included issuing security personnel long-barreled weapons, adding an insider-attack scenario to their training, and strengthening ties to local law enforcement. The military also joined an FBI intelligence-sharing program aimed at identifying terror threats.

In September, a former Navy man opened fire at the Washington Navy Yard, leaving 13 people dead, including the gunman. After that shooting, Defense Secretary Chuck Hagel ordered the Pentagon to review security at all U.S. defense installations worldwide and examine the granting of security clearances that allow access to them.

Asked Wednesday about security improvements in the wake of the shootings, Hagel said: "Obviously when we have these kinds of tragedies on our bases, something's not working."

Fox News’ Cristina Corbin, Jana Winter, Jennifer Griffin, Justin Fishel, Martin Finn, Shayla Bezdrob and The Associated Press contributed to this report.