A soldier shot dead three colleagues and injured 16 others at the US Army’s Fort Hood base in Texas before killing himself, the military says.
US media named the suspect as Ivan Lopez, 34, although his identity has not been officially confirmed.
The gunman had served in Iraq and had mental health problems, officials said.
President Barack Obama said he was “heartbroken” over the attack. A gun rampage at the same base in 2009 left 13 soldiers dead and 32 wounded.
Maj Nidal Hasan was sentenced to death for that attack.
US military spokesman Lt Gen Mark Milley told reporters that there was so far no indication that Wednesday’s shootings were related to terrorism.
He said the suspect had not been injured when he served in Iraq in 2011, but was being assessed to see if he had post-traumatic stress disorder.
The gunman was being treated for depression and anxiety, Gen Milley added.
The general said that it was not clear if the attack was premeditated and those wounded and killed were all members of the military.