The gunman was later found dead.
Authorities have not yet determined a motive for the killings. A handgun was recovered at the scene, which Dean says has not been examined in detail yet.
Authorities urged the public to avoid the area.
In a chilling coincidence, numerous people inside were also survivors of the Route 91 shooting - the most deadly in modern U.S. history. On Oct. 27, a gunman killed 11 people at a synagogue in Pittsburgh.
Once again, President Donald Trump has ordered flags at half-staff "in a mark of solemn respect".
Police had multiple run-ins with Long in the past, Dean said. His face was partly covered as he shot at people in the club.
When deputies arrived at the scene three minutes after the first 911 call, shots were still being fired, Dean said.
Chandler Gunn, 23, told the San Diego Tribune that when he heard about the shooting he rushed to the bar and called a friend who works at Borderline, who like numerous bar's regular patrons was also at the Route 91 Harvest music festival in Las Vegas when a gunman killed 58 people and wounded hundreds.
Coffman said he bonded with Cody over outdoor activities - he coached his son in baseball starting from age 3 and the two often went fishing together.
The wounded police officer was taken to hospital, but later died of his injuries.
The gunman was found dead.
Dean said the slain deputy was on the phone with his wife before telling her he had to go respond to a scene.
Cody's father, Jeff Coffman, confirmed that his son had been killed in the shooting - "his name is Cody Coffman and he is my first born son", he told reporters.
The bar's website says its hosts "College Country Night" every Wednesday. "That was the last thing I said". "I love you. I'll talk to you later".
Other witnesses described seeing and hearing people smashing windows with barstools to create escape routes from the bar.
During an interview with CNN, Sgt. Eric Buschow of the Ventura County Sheriff's Office said Helus was a "true cop's cop", enthusiastic and excited about his work in law enforcement.
"We don't know who shot anybody at this point".
"He didn't say anything, at least not that we could hear", Estron added. "There was an exit right next to me, so I went through that". People out there didn't really know what was going on.
"I saw the shots go off, although I didn't really see the guy", she said. He was accompanied by an officer from the California Highway Patrol on his way into the building.
He said: "We will pray, begin to comfort one another in our grief, and hold the families, friends and loved ones of the victims in our hearts".