Ventura County Sheriff Geoff Dean named the suspect, who was also killed, as Ian Long, aged 28. Dean told a news conference Long had likely shot himself.
He said he appeared to have shot at random, using only a Glock .45-caliber handgun. There was no known motive.
An unknown number of people were wounded in the shooting at the Borderline Bar and Grill, a popular venue with college students and young adults in the suburb of Thousand Oaks. Wednesday was dubbed “College Country Night”.
Deputies were at the suspect’s house seeking a search warrant. The gun used in the attack was a Glock handgun, which is designed to hold up to 10 rounds and one in the chamber.
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:30 p.m. PST (0730 GMT).
Dean estimated that 10 to 15 people, including one with a gunshot wound, had gone 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.