Washington: At least 12 people, including a police officer, were killed after a gunman forced his way into a popular bar in the US state of California and opened fire, officials said. The shooter was later found dead at the scene.

According to the police, the shooting began at about 11.20 p.m. on Wednesday (0730 GMT Thursday) at the Borderline Bar and Grill in Thousand Oaks. At least 12 people were injured in the attack. Ventura County sheriff's deputy Sergeant Ron Helus was among those killed, CNN reported.

Helus had been in the force for 29 years and was due to retire in 2019. He was shot several times and later declared dead at a local hospital.

Sheriff Geoff Dean told the media that the suspected gunman was found dead inside the bar and he was yet to be identified. The motive for the shooting was not known.

At least 200 people were reportedly inside the bar attending a college country music night at the time of the incident, media reports say.

Dozens of shots were reportedly fired by the suspect, who police believe may have taken his own life.

Witnesses described a scene of panic in the bar when the gunman started firing. Some said they used chairs to break windows to escape while others sheltered inside toilets.

The suspect may have used smoke grenades and at least one weapon, described as a semi-automatic handgun by witnesses, during the attack.

"A gentleman, who walked in through the front door, shot the girl that was right behind the counter," said Holden Harrah, who witnessed the shooting.

Another eyewitness who was injured told local television channel KTLA that the shots sounded "like fireworks".

"We just dropped to the ground, we heard a lot of screaming. My friend is the DJ so she cut off the music, we just heard a lot of mayhem," he said.