(CNN) - At the first gunshot, people dancing and having a good time at the Borderline Bar & Grill in Thousand Oaks, California, tried to process the pop they just heard.
The pops kept coming and many in the place dived to the floor, searching for a way out. Some people moved to put themselves between the shooter and his potential targets.
Teylor Whittler, a California Lutheran University student, said there was little screaming, just gunfire and a stampede of people.
"There were at least 50 people that all tried getting up at once and run out the back door. I ended up getting caught in the ground and stumbled over by multiple people," Whittler told CNN affiliate KABC. "Everyone just yelled, 'Run, he's coming!'"
Live updates on mass shooting
The gunman, a US Marines veteran, arrived at the bar on Wednesday night with a pistol, officials said. He shot an unarmed security guard outside the bar, then went in and continued shooting, injuring other security workers, employees and patrons, Ventura County Sheriff Geoff Dean said. Ian David Long, killed 12 people before apparently taking his own life.
"It's a horrific scene in there," the sheriff told reporters at a media briefing. "There is blood everywhere and the suspect is part of that."
The casualties included a veteran sheriff's deputy who was nearby talking to his wife on the phone when the call came over the radio for an active shooter.
"(The deputy said), 'Hey, I have to handle a call. I love you, I'll talk to you later,' " the sheriff said.
Sgt. Ron Helus rushed into the bar as gunshots continued; he was killed.
Investigators believe Long, 28, used a legally purchased .45-caliber Glock 21 with an extended magazine during the shooting, and they're trying to figure out why he did it.
"We have no idea what the motive was at this point," Dean said Thursday afternoon.
Authorities have identified a Facebook post believed to have been made by the shooter around the time of the attack, according to a law enforcement official familiar with the ongoing investigation.
In it, the writer says: "I hope people call me insane... (laughing emojis).. wouldn't that just be a big ball of irony? Yeah.. I'm insane, but the only thing you people do after these shootings is 'hopes and prayers'.. or 'keep you in my thoughts'... every time... and wonder why these keep happening..."
When CNN read the post to a friend of Long's, who did not want to be publicly identified, the friend said, "That does not sound like Ian to me at all. I don't know what was going through his head when he wrote this. It must have been terrible."
What we know about the shooting
Dance floor packed when shooting inside started
The shooting broke out during the Western-style bar's weekly line dancing and college night open to people 18 and older. People dropped to the floor and hid behind barstools in stunned silence, witnesses said. Others jumped over chairs and broke windows to get out.
Sarah Rose DeSon told CNN's "Anderson Cooper 360˚" that her friend Cody Coffman saved her life. DeSon said she was paralyzed by fear as she saw the gunman pointing his gun.
Coffman told her to get down.
"I didn't know what to do and I just followed him. I dropped down and I hid with him," she said, until he got her to run when the shooter moved away from them. She fled out the front door, but her friend died inside.
Taylor Von Molt, 21, said she was dancing when she "heard what I thought was a balloon pop."
"I heard it a couple more times, and I turned around and I saw him (the gunman)," she said. "He had ... what looked like a bandanna on the bottom on his face, sunglasses, black hoodie, dark jeans."
About 21 others were injured, many trying to escape, the sheriff's office said.
Hundreds line up to donate blood
Six off-duty law enforcement officers were in the bar when the shooting happened, Dean said. Officials said they were unharmed.
A woman whose daughter was at the bar said one of those officers "stood in front of her daughter, protecting her life with his own," Ventura County sheriff's Senior Deputy Julie Novak told CNN affiliate KCAL/KCBS.
Whittler told KABC that several men were in position to block the shooter "ready to take a bullet for every single one of us."
Witnesses described a man clothed in black and wearing glasses as he walked onto the dance floor filled with people and began shooting.
Von Molt ran toward the nearest exit but tripped, and people kept running on top of her in a rush to escape, she said.
John Hedge, who was at the bar with his stepfather, told KABC that he hit the ground after hearing three or four popping sounds.
"I started hearing these big pops. Pop, pop, pop," he said. When he looked up, he said, he saw a security guard who had been shot.
Nick Steinwender, who is part of California Lutheran's student government, said his friends were inside the bar when the shooting started.
"It was chaos, people jumping out of windows, hopping over gates and just trying to get out," he told KABC. "From what I heard, the gunman started shooting at the front desk. ... Students were hiding in the attics, bathrooms and stuff like that."
Long had previous contacts with the law, sheriff says
Deputies were at Long's home in the Newbury Park area of Thousand Oaks on Thursday morning, seeking to serve a search warrant, Dean said. Thousand Oaks is in Ventura County, about 40 miles from downtown Los Angeles.
Long was in the US Marine Corps from August 2008 to March 2013, Defense Department records show.
Law enforcement had several previous contacts with Long, including in April when officers were called to a disturbance at his home, the sheriff said.
"He was somewhat irate, acting a little irrationally," Dean said. Mental health specialists talked to him and didn't feel he qualified to be detained under the state's "5150" mental health detention law, Dean said.
One of Long's neighbors, Tom Hansen, told KABC he had called police in April.
"I don't know exactly what he was doing -- it was like he was banging on the walls and shouting," Hansen said. "It concerned me, so I called the police."
Hansen told KABC everything seemed to go back to normal afterward and he never learned what had happened.
Long also had been a victim of battery at a different Thousand Oaks bar in January 2015, the sheriff said.
Long posted about his service with the Marines on an online forum called ShadowSpear in March 2017. He wrote he had been an infantry machine gunner, had served in Afghanistan and was an instructor in Okinawa, Japan.
Deputy killed after rushing inside
Helus, the slain sheriff's deputy, arrived at the bar three minutes after 911 calls came in, along with two California Highway Patrol officers, Dean said.
Helus went in because gunshots still were being fired, and he was shot multiple times, Dean said.
A Highway Patrol officer pulled Helus out and waited for reinforcements. When more officers arrived, they found the gunman dead inside, Dean said.
Helus died at a hospital, police said. He is survived by a wife and a son.
"I don't think there's anything more heroic than what he did," a colleague, sheriff's Sgt. Eric Buschow, said Thursday morning.
Father crushed to learn his son was killed
Some of the friends of Coffman, 22, who escaped called and woke his father around 1 a.m. to tell him they didn't know if his son had gotten out.
Just before 10 a.m., the father told reporters Cody had died.
In between sobs, Jason Coffman recounted his last conversation with Cody.
"I talked to him last night before he headed out the door. First thing I said was, 'Don't drink and drive.' "
"Last thing I said was, 'Son, I love you.' "
Other victims included Alaina Housley, the niece of "The Real" co-host Tamera Mowry-Housley; Justin Meek, a recent college graduate; Noel Sparks, a church volunteer; and Dan Manrique, a Marine veteran who was a regional manager with a veterans organization.
The victims' stories