A soldier opened fire on fellow service members at a US military base, killing three people and wounding 16 before committing suicide.
It happened at the Fort Hood post in Texas where more than a dozen people were killed in a 2009 attack.
The shooter, named as Ivan Lopez, apparently walked into a building and began firing a .45-calibre semi-automatic pistol that had been purchased recently.
He then got into a vehicle and continued firing before entering another building and kept shooting.
He was eventually confronted by military police in a car park. As he came within 20 feet of an officer, the gunman put his hands up but then reached under his jacket and pulled out his gun.
The officer drew her own weapon, and the suspect put his gun to his head and pulled the trigger a final time.
The gunman, who was married and served in Iraq for four months in 2011, had sought help for depression, anxiety and other problems.
Before the attack, he had been undergoing an assessment to determine whether he had post-traumatic stress disorder, according to Lieutenant General Mark Milley, the senior officer on the base.
The 2009 assault on Fort Hood was the deadliest attack on a domestic military installation in US history. Thirteen people were killed and more than 30 wounded.
The suspect in yesterday’s shooting had arrived at Fort Hood in February from another base. He was taking medication, and there were reports that he had complained about suffering a traumatic brain injury, Lt Gen Milley said.
The gunman was not wounded in action, according to military records, he said, and there was no indication the attack was related to terrorism.
The military declined to identify the gunman until his family members had been notified. Texas Representative Michael McCaul, chairman of the House Homeland Security Committee, said he was named Ivan Lopez.
Investigators have 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,” said a federal law enforcement official.
The official said authorities would begin by speaking with Lopez’s wife and also expected to search his home and any computers he owned.
The injured were taken to the base hospital and other local hospitals. Dr Glen Couchman, chief medical officer at Scott and White Hospital in Temple, said the first four people admitted there had gunshots to chest, stomach and neck. Their conditions ranged from stable to “quite critical”.
After the shooting began, the post was locked down. Until an all-clear siren sounded hours later, relatives of soldiers waited for news about their loved ones.
Tayra DeHart, 33, said she had last heard from her husband, a soldier at the post, that he was safe, but that was hours earlier.
“The last two hours have been the most nerve-racking I’ve ever felt. I know God is here protecting me and all the soldiers, but I have my phone in my hand just hoping it will ring and it will be my husband,” she said.
Brooke Conover, whose husband was on base at the time of the shooting, said she found out about it while checking Facebook. She said she called her husband, Staff Sargeant Sean Conover, immediately to make sure he was OK.
“I just want him to come home,” she said.
President Barack Obama vowed that investigators would get to the bottom of the shooting.
In a hastily arranged statement in Chicago, he reflected on the sacrifices that troops stationed at Fort Hood have made – including enduring multiple tours to Iraq and Afghanistan.
“They serve with valour. They serve with distinction, and when they’re at their home base, they need to feel safe,” the president said.
“We don’t yet know what happened tonight, but obviously that sense of safety has been broken once again.”
He spoke without notes or prepared remarks in the same room of a steakhouse where he had just met about 25 donors at a previously scheduled fundraiser for the Democratic National Committee.
The November 2009 attack happened inside a crowded building where soldiers were waiting to get vaccines and routine paperwork after recently returning from deployments or preparing to go to Afghanistan and Iraq.
Army psychiatrist Nidal Hasan was convicted and sentenced to death last year in that mass shooting. He said he acted to protect Islamic insurgents abroad from American aggression.
According to testimony during Hasan’s trial last August, he walked inside carrying two weapons and several loaded magazines, shouted “Allahu Akbar!” - Arabic for “God is great!” – and opened fire with a handgun.
The rampage ended when Hasan was shot in the back by Fort Hood police officers. He was paralysed from the waist down and is now on death row at the military prison at Fort Leavenworth in Kansas.
After that shooting, the military tightened security at bases nationwide. Those measures included issuing security personnel long-barrelled 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, defence secretary Chuck Hagel ordered the Pentagon to review security at all US defence installations worldwide and examine the granting of security clearances that allow access to them.
Asked yesterday about security improvements in the wake of other shootings at US military bases, Mr Hagel said, “Obviously when we have these kinds of tragedies on our bases, something’s not working.”