The man who opened fire in a Southern California bar on Wednesday, killing 12 people before apparently shooting himself, was a former US Marine who served in Afghanistan, law enforcement officials said.
The gunman was identified by police as 28-year-old Ian David Long.
Paul Delacourt, assistant director in charge of the Los Angeles FBI office, said it was too early to speculate on the shooter's motives but said he appeared to have acted alone.
Long opened fire, seemingly at random, inside the Borderline Bar and Grill in Thousand Oaks, a suburb northwest of Los Angeles, at about 11:30 p.m. on Wednesday (3:30 p.m. on Thursday BJT), Ventura County Sheriff Geoff Dean said.
Witnesses talked about "utter chaos" and Dean described the scene inside the bar, which was popular with students, as being "like ... hell."
Among those killed was a 29-year veteran of the sheriff's department, 54-year-old Sergeant Ron Helus. He and a California Highway Patrol officer were the first to arrive at the bar and exchanged gunfire with Long, Dean said. The sergeant was shot "several times."
Long was later found dead of an apparently self-inflicted gunshot wound in an office at the bar.
He was armed with a single handgun, a .45 caliber Glock 21, which he purchased legally, Dean said.
Police work in the area after a gunman opened fire at a bar in Thousand Oaks, California, November 8, 2018.
Dean said his department had "several contacts" with Long over the years, for minor incidents including a traffic collision, and in 2015 when he was beaten up at a local bar.
Long was in the Marine Corps from 2008 to 2013, serving as a machine gunner in Afghanistan, and the sheriff said he may have suffered from post-traumatic stress disorder.
"Obviously, he had something going on in his head that would cause him to do something like this," Dean said.
In April this year, deputies were called to his house for a disturbance and found him "acting a little irrationally."
Mental health specialists talked with Long and determined that no further action was necessary, the sheriff said.
Police on Thursday were searching Long's house in Newbury Park, near Thousand Oaks, where he reportedly lived with his mother.
The massacre was the latest shooting rampage in the United States amid a fierce debate over gun control, and occurred in a city reputed as one of the safest in the country.
A screenshot of US President Donald Trump's Twitter after the bar shooting in California.
President Donald Trump ordered US flags to be flown at half-staff at public buildings and grounds.