The gunman in the mass shooting at a bar in Thousand Oaks, CA, entered the building and opened fire, tossed multiple smoke grenades to sow chaos and then sat in wait to ambush responding law enforcement officers, officials said on Tuesday.

The gunman fired a total of more than 50 rounds in the shooting at Borderline Bar & Grill on the evening of Nov. 7, Ventura County Sheriff Bill Ayub said. Eleven people were killed in the bar, KTLA reports.

After the initial shooting, the gunman positioned himself in anticipation of the police response, Ayub said. When officers entered, he ambushed them immediately from a position of tactical advantage, mortally wounding Ventura County Sgt. Ron Helus. The officers returned fire but did not strike him, and then retreated from the scene and waited for SWAT, Ayub said.