Thirteen people have died, including a sheriff’s sergeant and the gunman, after a shooting inside a crowded Southern California bar.
Ventura County Sheriff Geoff Dean said sheriff’s Sergeant Ron Helus responded to the scene and was shot after he entered the building.
He died at a hospital early on Thursday but authorities did not say how the gunman died.
Mr Helus was a 29-year veteran of the force with a wife and son and planned to retire in the coming year, said the sheriff, who choked back tears several times as he talked about the sergeant who was also his long-time friend.
“Ron was a hardworking, dedicated sheriff’s sergeant who was totally committed,” Mr Dean said.
“And tonight, as I told his wife, he died a hero because he went in to save lives.”
Mr Dean said around 10 other people were shot and wounded.
Ventura County Sheriff’s Office Captain Garo Kuredjian said the first reports of shots fired came around 11.20pm local time at the Borderline Bar & Grill in Thousand Oaks, which is about 40 miles west of Los Angeles.
The bar’s website said it hosts College Country Night every Wednesday.
Police said hundreds were inside when the shooting occurred.
Tayler Whitler, 19, said she was inside the bar when a man walked in with his face partly covered by something resembling a ski mask, opened fire on a person working on the door, then began to shoot people at random.
“It was really, really, really shocking,” she told KABC-TV as she stood with her father in the Borderline car park.
“It looked like he knew what he was doing.”
It has been “quite some time” since there was a shooting of any kind in Thousand Oaks, a city of about 130,000 people around 40 miles west of Los Angeles.
Nick Steinwender, student union president at nearby California Lutheran University, rushed to the scene when he heard about a shooting at the bar where he knew friends and fellow students were.
“It was chaos, people jumping out of windows, people hopping over gates to get out,” Mr Steinwender told KABC.
He said he heard from people inside that they were hiding in toilets and the attic of the bar.