Updated at 1.30pm

A gunman killed 12 people including a sheriff's deputy after he walked into a Southern California bar and started shooting late Wednesday night, police said.

The gunman was also killed, Ventura County Sheriff Geoff Dean told a news conference early Thursday, though it was not immediately clear by whom.

An unknown number of people were wounded during the attack at the Borderline Bar and Grill, a country & western venue in the Los Angeles suburb of Thousand Oaks.

"It's a horrific scene in there," Dean said. "There is blood everywhere and the suspect is part of that."

The dead officer was identified as Sergeant Ron Helus, a 29-year veteran of the department, Dean told reporters. Helus and a California Highway Patrol officer were the first to arrive at the bar and went inside just before 11.30pm PST (0730 GMT).

After a lull of about 15 minutes, more officers went inside and found the suspected gunman dead of a gunshot wound. It was not clear whether he killed himself or was killed by officers, Dean said.

The incident came less than two weeks after a gunman with an automatic rifle fatally shot 11 people during sabbath services at a Pittsburgh synagogue.

Witness John Hedge told ABC News he was near the front door of the California bar when the shooting began. “I just started hearing these big pops. Pop pop pop. There was probably three or four. I hit the ground. I look up. The security guard ... was shot, he was down. The gunman was throwing smoke grenades all over the place. I saw him point to the back at the cash register and he just kept firing."

Dean estimated that 10 to 15 people, including one with a gunshot wound, went themselves to area hospitals. He said he thought their injuries were minor, and that most of them were likely injured as they escaped, some by breaking windows.

None of the civilian victims were identified. Helus died while being treated at an area hospital several hours after he was shot, Dean said.

Officials said shots were still being fired when the first officers arrived at the scene.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.