The shooter, who has not been named publicly but has been identified by police, stormed Borderline Bar and Grill in Thousand Oaks on Wednesday at 11.20pm. He first shot the bouncer then opened fire on the crowds of youngsters who were there to enjoy a night of line dancing and country music.
As dozens ran for their lives, hid beneath pool tables and used bar stools to shatter the windows to escape, the shooter continued firing his Glock .45.
He also threw smoke grenades to confuse the crowds.
When the first police officers arrived at the scene three minutes later, the gunman shot one of them multiple times before shooting himself. By the time SWAT teams arrived, he was dead. The sheriff's sergeant who was shot later died in hospital. He was Ron Helus, a 29-year veteran.
In total, 13 are dead; 11 people inside the bar, the sheriff's sergeant and the gunman. The gunman was 29 and drove his mother's car to the bar to carry out the attack.
Scroll down for video
He and another officer from California Highway Patrol arrived at the bar minutes after the first 911 calls came in.
He looked like he knew what he was doing. He had practiced, he had been shooting before
Witness Teylor Whittler
The 'hardworking' officer, who was due to retire this year and leaves behind a wife and son.
An additional '10 to 15' victims were injured during the mass shooting, including the bouncer, a young female cashier and college students.
On Thursday morning, President Trump tweeted about the mass shooting, saying: 'I have been fully briefed on the terrible shooting in California.
Law Enforcement and First Responders, together with the FBI, are on scene. 13 people, at this time, have been reported dead.
'Likewise, the shooter is dead, along with the first police officer to enter the bar. Great bravery shown by police.
'California Highway Patrol was on scene within 3 minutes, with first officer to enter shot numerous times.
'That Sheriff's Sergeant died in the hospital. God bless all of the victims and families of the victims.
'Thank you to Law Enforcement,.'
The gunman shot himself before SWAT teams got inside. He was dressed in all-black, wearing a baseball cap, sunglasses and a mask covering the bottom part of his face.
He walked up to the entrance at 11.20pm and shot the bouncer before making his way into the venue. He then shot a young female cashier before throwing smoke grenades onto the dance floor and letting off rounds into the crowd.
The bar is popular with college kids because it allows under 21s in on Wednesday nights. Those who were not old enough to drink had black X's stamped on their hands.
Pepperdine University confirmed on Thursday morning that some of its students were among those in the bar. It is unclear if they were among those killed.
'The University has determined that multiple Pepperdine students were on site at Borderline Bar and Grill in Thousand Oaks. At this time, the University is working to identify and provide support to those students.
Ventura County Sheriff Geoff Dean said the scene was the worst he had seen in 41 years.
'It's a horrific scene in there, there is blood everywhere and the suspect is part of that, and I didn't want to get that close and disturb the scene and possibly disturb the investigation.
'This, by far, is the most horrific thing I've seen in my 41 years,' he said. Dean was due to retire on Thursday, the day after the shooting. He and Helus were workout buddies.
Paying tribute to him, he said: 'Ron was a hardworking dedicated sheriff's sergeant.
'He was totally committed, he gave his all and tonight, as I told his wife, he died a hero; he went into save lives, to save other people.'
'Pepperdine officials are working with authorities and will provide updates as more information is available. The University offers its deepest condolences and is praying for everyone involved in tonight's tragic events,' it said.
Classes at California Lutheran, which is also nearby, were cancelled. People were hiding from the shooter in bathrooms and attic spaces, while others who managed to escape fled to nearby gas stations for medical help.
Terrified dancers used bar stools to smash the windows so that they could climb out and flee. Witnesses said the gunman said 'nothing' as he opened fire and was composed throughout the massacre.
'I was just dancing normally and I heard what I thought was a balloon pop. I was confused then I heard it a couple more times then I turned around and I saw him.
'I ran to the nearest exit and tripped and fell on the way I knocked on as many doors as I could until someone would answer me and finally someone did. It was awful,' Taylor Von Molt, a promoter for the club, told CNN.
She said the gunman's mask looked like a bandanna and was covering the bottom of his face.
'He had a black mask, it looked like a bandanna, on the bottom of his face, sunglasses dark hoodie, dark jeans. He was kind of bigger, more burly. Scary,' the 21-year-old said.
Teylor Whittler, another witness, said the gunman had 'perfect form' and 'looked like he knew what he was doing.'
'I saw three people get shot by him. As soon as he walked in, he had perfect form. I'm born in a military family and I've been around guns my entire life so I know a bit about them.
'He looked like he knew what he was doing. He had practiced, he had been shooting before,' she told Fox News. She added that while the bar was popular among students, it attracted patrons of all ages.
'I want my son. I want to know. I'm not.. if the Lord took him away, we know that he's in a better place but if he's not, please let us know. Let me know. I am clueless on what's going on
Jason Kaufman whose son Cody, 22, is missing
'College students go there, high school seniors go there, elderly people go there. Everyone who loves country goes there,' she said.
Among the survivors is a member of the Navy who led others out of the windows after smashing the windows with bar stools.
'We heard a lot of screaming and we dropped to the ground. My friend is a DJ, she cut the music.
'My first instinct was to smash the window. We jumped out,' he told KTLA.
Several minutes after the gunman opened fire, a SWAT team arrived and found the 11 victims dead inside.
Several people are still unaccounted for including 22-year-old Cody Kaufman whose father Jason flocked to the bar after he heard the news to find him.
Other parents have done the same and have used looked to their kids' iPhones and iWatches locations to try to find them. Their devices are still inside the bar and they have not been heard from since the shooting happened.
'I want my son. I want to know. I'm not.. if the Lord took him away, we know that he's in a better place but if he's not, please let us know. Let me know.
'I am clueless on what's going on,' Cody's father Jason wept outside the bar.
There were 100 people inside the bar when the gunman opened fire, police said, and the number of casualties is 'very likely' to go up.
Survivors of California music bar shooting seen hugging and crying
Toddler left with HORRIFIC injuries after being bitten 15 times
Michel Barnier humiliated after Angela Merkel leaves during speech
Three men found guilty of murdering South African student
New documentary to give inside look at Prince Charles at 70
'Horrible': South Norwood community appalled by Grenfell bonfire
Recording reveals moment the guns fell silent at the end of WW1
Acosta banned from the White House after heated press conference
Fraud Bae! Woman finds out she was scammed by her ex-boyfriend
Survivors of California bar shooting describe panicked scenes
Driver shows how to beat car hackers by putting keys in a DRINK CAN
President Trump gets into a heated exchange with CNN's Jim Acosta
One witness told ABC7: 'I was at the front door talking to my stepdad. I heard these big pops.
'There were three or four and I hit the ground. The security guard was dead and the man had a handgun. He threw in smoke bombs and he kept firing. People threw chairs out of the windows to try to get away.
'The gunman had glasses and a black jacket. He had a big hand gun.'
Another witness said: 'This maniac came in. Threw in smoke to confuse people and opened fire on the dancefloor. He's taken many young lives.
Witnesses reported a horrifying scene as gunfire echoed through the club and those inside ran for cover, in some cases breaking windows with chairs and other pieces of furniture to get out of the building.
Local hospitals have been inundated with victims who've transported themselves to emergency rooms with injuries seeking medical help.
One witness, who was at the bar with his step-son, described the sequence of events. He said: 'He shot the front doorman, who was just a young man.
'Then he shot the cashier, just a young girl. Then he started moving to the right. He wasn't looking at us. Then he went into the office, where all the cash and stuff is.
'He didn't say anything at all. He just started shooting.'