Military officials identified Ivan Lopez, an army specialist who served in Iraq, as the gunman who opened fire at the Fort Hood military base in Texas on Wednesday night, killing three and injuring 16 before killing himself.

Lt. Gen. Mark Milley, speaking at a Thursday news conference, said there’s “strong evidence” that Lopez had a medical history that left him in an unstable psychological state.

Milley offered condolences to the families of those killed and those recovering in hospital. He said military investigators don’t think Lopez, 34, was targeting anyone when he opened fire, though there’s a “strong possibility” he had an altercation with another soldier before the shooting. 

Earlier, officials at the Scott & White Hospital in Temple, Texas, where the victims were taken after being processed at a hospital on base, said Thursday that the eight male victims and one female victim are current military personnel ranging in age from 21 to the mid-40s.

The three victims that remain in critical condition are on ventilators and are awaiting more surgery. The patients are suffering from a neck injury, an abdominal injury and the third has potential spinal trauma caused by bullet wounds. Two of those patients are expected to be operated on this evening or tomorrow morning, hospital officials said. 

Several other victims received "superficial" injuries caused by shrapnel or ricocheting bullets and as many as three may be discharged from hospital as early as this evening. 

Gunman treated for mental illness

Lopez was from the U.S. territory of Puerto Rico and joined the island's National Guard in 1999. He went on a peace and security mission to Egypt's Sinai Peninsula in the mid-2000s, and left the National Guard in 2010 to join the U.S. Army, said Lt. Col. Ruth Diaz, spokeswoman for the Puerto Rico National Guard.

The gunman apparently walked into a building Wednesday afternoon and began firing a .45-calibre semi-automatic pistol. He then got into a vehicle and continued firing before entering another building, but he was eventually confronted by military police in a parking lot, according to Fort Hood commanding officer Lt.-Gen. Mark Milley.

"If you have a weapon and you're on base, it's supposed to be registered on base," said Milley. "This weapon was not registered on base."

Lopez was on medication and undergoing treatment for depression, anxiety and some other psychological issues, said Milley. The soldier also self-reported a traumatic brain injury after coming back from Iraq, he said, but it is unclear if it was officially diagnosed.

Speaking to a Senate committee on Thursday, U.S. Army Secretary John McHugh said that the shooter was seen by a psychiatrist last month but showed no signs of violence or suicidal tendencies. He went on to say that there is no evidence the shooter was involved in any extremist organizations, and added that he did not directly experience combat while on duty in Iraq. 

"He was undergoing a variety of treatment and diagnoses for mental health conditions, ranging from depression to anxiety to some sleep disturbance. He was prescribed a number of drugs to address those, including Ambien," McHugh said. 

Gunman fired shots in 2 buildings

Milley said the timeline for the shooting is still being pieced together by investigators, but they have a rough sequence of events.

The first shots were fired at about 4:04 p.m. local time, he said.

hi-forthood

Lucy Hamlin and her husband, Timothy Hamlin, wait for permission to re-enter the Fort Hood military base, where they live, following a shooting on base on Wednesday. (Tamir Kalifa/Associated Press)

The soldier walked into a building and opened fire. He then retreated to a vehicle and fired from inside it. After he exited the vehicle, the soldier walked into a second building and fired again.

He was then engaged by a responding military police officer.

Milley said the soldier approached the police officer, who was about six metres away. He first put his hands up, but then reached under his jacket and pulled out his pistol.

The police officer engaged, Milley said, at which point the soldier put the pistol to his head. He appears to have died of a self-inflicted gunshot wound to the head.

The officer's actions were "clearly heroic," said Milley, adding that "she did exactly what we would expect of the United States army military police."

One of the two buildings houses the day-to-day administration of the medical brigade, while the other houses the day-to-day administration of the transportation battalion.

“Events in the past have taught us many things here at Fort Hood. We know the community is strong, we know the community is resilient," said Milley. "We will get through this."

In 2009, an assault on Fort Hood was the deadliest attack on a domestic military installation in U.S. history. Thirteen people were killed and more than 30 injured.

Investigation underway

Federal, state and local officials are investigating the shooting, said Milley.

Milley said there is no indication that the incident was related to terrorism, though it is not being ruled out.

'Events in the past have taught us many things here at Fort Hood. We know the community is strong, we know the community is resilient.'-  Lt.-Gen. Mark A Milley

Officials are looking into the shooter's background, checking for any criminal history, looking into his psychiatric history and evaluating his experience in combat.

A federal law enforcement official told The Associated Press that investigators will interview the shooter's wife and search his home.

Additionally, investigators will have to seek out any witnesses who may have heard what the shooter said during the attack. The official spoke on condition of anonymity.

Milley revealed the soldier had arrived at Fort Hood in February from another installation in Texas, which is helping investigate his background.

The soldier was not wounded in combat during his time in Iraq, said Milley, but there are reports that he had complained after returning from Iraq about suffering a traumatic brain injury. The commander did not elaborate.   

No motive has been discovered yet.

'Sense of safety broken once again'

U.S. President Barack Obama promised that investigators would get to the bottom of the shooting.

He acknowledged the many sacrifices of the people at Fort Hood.

USA-SHOOTING/FORTHOOD-OBAMA

U.S. President Barack Obama said on Wednesday he was 'heartbroken' that another shooting had occurred at the Fort Hood Army base. (Larry Downing/Reuters)

"They serve with valour and they serve with distinction, and when they're at their home base, they need to feel safe," Obama said, speaking without notes or a prepared speech from Chicago. "We don't yet know what happened tonight, but obviously that sense of safety has been broken once again."

It was the third shooting rampage at U.S. military base in just over six months, with memories still fresh from shootings at the Washington Navy Yard in September and late last month at Naval Station Norfolk in Virginia.

Military families at Fort Hood, a base still reeling from the 2009 attack when an Army psychiatrist killed 13 people and wounded 32 others, appeared shaken on Thursday. The wife of an emergency room doctor who treated some of the victims said she panicked when she heard the news.

"The problem is, both shootings have been an inside job. A soldier already stationed here and allowed access. I think a positive step would be better care for the mentally ill, since that seems to play a part in the majority of mass shootings - not just within the military," Chrissie Jennette told Reuters.

U.S. Defence Secretary Chuck Hagel said the latest incident at Fort Hood showed that there were problems that still needed to be addressed.

Something is not working, Hagel said, "when we have these kinds of tragedies on our bases."

"So we'll identify it, we'll get the facts, and we'll fix it," Hagel told reporters, standing on the flight deck of the USS Anchorage, an amphibious ship, in Hawaii.

Obama also said the shooting reopens the painful memories of the deadly attack at Fort Hood five years ago that left 13 people dead and 31 wounded. 

Army psychiatrist Nidal Hasan was convicted and sentenced to death last year in the November 2009 attack. He said he acted to protect Islamic insurgents abroad from American aggression.Hasan, who was shot in the back by Fort Hood police officers and paralyzed from the waist down during the shooting, is now on death row at a Kansas military prison.

Fort Hood security overhaul

Fort Hood itself had already overhauled its own security to better deal with potential "insider threats" after the 2009 attack. Milley suggested that the security overhaul helped limit the damage from the shooter, who served four months in Iraq in 2011.

"I think the response from the law enforcement and the medical folks displayed clear lessons learned from the previous case," Milley said, describing the swift reaction by military police to confront the shooter and by medical responders to reach victims.

hi-nidal-hasan-cp-02996484

Nidal Hasan is currently on death row in a Kansas military prison for the 2009 shooting rampage that left 13 dead and 31 wounded. (Bell County Sheriff's Department/The Temple Daily Telegram/Associated Press)

Just over two weeks ago, Hagel himself unveiled a sweeping review of the Navy Yard shooting, which concluded the rampage that killed 12 people could have been averted if concerns about the gunman's mental health been properly handled.

Hagel endorsed establishing an insider threat management and analysis centre within the Pentagon and moving to a system with better monitoring of personnel with security clearances.

In the Norfolk case, a civilian went on base and shot dead a sailor aboard a docked navy destroyer before being killed.

While some observers question whether shooters can always be stopped, Hagel rejected the idea that nothing more could be done. He called for patience as investigators gather facts.

"We don't have any choice here but to address what happened, and do everything possible to ensure the safety of our men and women who work on these bases," Hagel told reporters.

"It isn't a matter of a question or challenge too tough. We will do it."

Milley said daily press conferences will be held to update the public on developments from the investigation.

With files from The Associated Press and Reuters