The suspect was found dead at the scene, in the city of Thousand Oaks northwest of downtown Los Angeles.

Highlights

Ian David Long, 28, was found dead at the bar in Thousand Oaks

Police said the accused gunman must have shot himself

He might have been suffering from PTSD as he was a veteran, police said

A 28-year-old former Marine opened fire in a California country music bar packed with college students, killing 12 people including a police officer as dozens of terrified youngsters stampeded towards the door, authorities said Thursday.

The gunman -- who apparently killed himself -- stepped into the Borderline Bar and Grill around 11:20 pm Wednesday and coolly began shooting, witnesses said, unleashing pandemonium as terrified patrons scrambled to escape.

"He had perfect form," bar patron Teylor Whittler told Fox News. "He looked like he knew what he was doing, he had practiced."

Ventura County Sheriff Geoff Dean told a news conference the suspect had been identified as Ian David Long, a veteran of the US Marine Corps.

He was found dead at the bar in Thousand Oaks, California, an upscale city northwest of Los Angeles.

Dean said authorities so far had no indication of a motive, or of any connection to terrorism. He said the victims were apparently targeted at random.

"We believe he shot himself," said Dean, who earlier described it as a "horrific scene."

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.

In April this year, deputies were called to his house for a disturbance and found him "acting a little irrationally."

"They felt he might be suffering from PTSD, the fact he was a veteran and had been in the corps," Dean said.

"It appears he walked up to the scene. He shot the security guard that was standing outside. He stepped inside," Dean said.

"It appears that he turned to the right and shot several of the other security and employees there, and then began opening fire inside the nightclub."

'Everyone dove to the floor'

Among those killed in the assault was a three-decade veteran of the sheriff's department, 54-year-old Ron Helus, who was married and had a grown son.

"He went in there to save people and made the ultimate sacrifice," Dean said.

The other 11 victims have yet to be identified by the authorities. Besides the dead, around a dozen other people were injured.

Matt Wennerstron, a 20-year-old college student who regularly attended events at the bar, said the shooter fired a short-barreled pistol that apparently had a 10-15 round magazine.

"Then, when (he) started to reload, that's when we got people out of there and I didn't look back," Wennerstron said.

He said he and others smashed their way out of the bar onto a balcony and then jumped down to safety. "One bar stool went straight through a window," he told reporters.

Jasmin Alexander, who was part of a group of around 15 friends at the bar, said there was chaos and confusion inside when shots first rang out.

"It was a normal Wednesday. We were just at the bar, having fun, dancing," she told reporters after escaping.

"All of a sudden we heard the 'bang, bang' of the gunshots and it just started going crazy and people were pushing.

"We thought it was a joke, we didn't take it seriously at first... because it sounded like firecrackers and everyone just dropped down to the floor."

TV footage showed SWAT teams surrounding the bar, with distraught revelers milling around and using their cell phones as lights from police cars flashed.

President Donald Trump tweeted that he had "been fully briefed on the terrible shooting," the latest chapter in America's epidemic of gun violence that came just 10 days after a gunman killed 11 worshippers at a synagogue in Pittsburgh.

Last year, a country music festival in Las Vegas was the scene of the worst mass shooting in modern US history. A gunman shooting from the 32nd floor of a hotel and casino with high power weapons killed 58 people.

(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)