BREAKING: Authorities identified the attacker in the shooting as Ian David Long, 28.

People were line dancing in a crowded Southern California country-music bar late Wednesday, witnesses said, when a gunman opened fire. Twelve people were killed. The gunman was later found dead inside.

The gunfire erupted during “College Country Night” at the Borderline Bar & Grill, a popular nightspot in Thousand Oaks, Calif.

Among the dead was Ron Helus, a veteran sergeant in the Ventura County Sheriff’s Office who was mortally wounded when he responded to the incident just minutes after 911 calls began flooding in, authorities said.

The only weapon recovered by early Thursday was a handgun, Ventura County Sheriff Geoff Dean said. Officials have not publicly identified the shooter.

“It’s a horrific scene in there,” Dean told reporters. “There’s blood everywhere. The suspect is part of that.”

Dean said he had no reason to believe that there was a link to terrorism, “but we certainly will look at that option.”

President Trump said on Twitter that he had been briefed on the shooting, and praised the “great bravery shown by police,” adding: “God bless all of the victims and families of the victims.”

In addition to the dead, Dean estimated that there were upward of 10 to 12 shooting victims who were “rescued from the scene and taken to local hospitals.” Additional victims with minor injuries fled the scene on their own, he added.

“I know there are parents wondering, ‘Oh my gosh, was one of my children in there? Or was it my sister or my brother?’” he said.

The attacker is a white male who may have used a larger clip for his handgun or was able to reload, according to a person familiar with the matter. Investigators were still working to determine the motive and other details.

Dean said the mass shooting, at a bar northwest of Los Angeles packed with students from nearby colleges, “is part of the horrors that are happening in our country and everywhere, and I think it’s impossible to put any logic or any sense to the senseless.”

‘It was sheer panic’

Reports of a shooter came in about 11:20 p.m. Pacific time Wednesday, and authorities arrived on the scene at 11:22 p.m., Dean said.

Helus, the sheriff’s sergeant, entered the venue with a California Highway Patrol officer several minutes later, at which point Helus was struck “multiple times,” Dean said. The CHP officer stepped back and secured the perimeter.

The gunfire briefly quieted, the sheriff said, as people scrambled to hide in restrooms and in attics.

“It was sheer panic,” said Teylor Whittler, 19, who was inside the venue at the time. “Everyone ran and dropped as fast as they could.”

Two women wearing blankets leave the area near the Borderline Bar and Grill in Thousand Oaks, California. (Mike Nelson/EPA-EFE/Rex)
Two women wearing blankets leave the area near the Borderline Bar and Grill in Thousand Oaks, California. (Mike Nelson/EPA-EFE/Rex)

She said she ran to the back door, where people crowded during a pause in the gunfire. “And then all, of a sudden, a couple of guys started running to the back door and said, ‘Get up he’s coming.’”

A young crowd

The Borderline Bar describes itself as Ventura County’s largest country dance hall and live music venue. With a dance floor covering about 2,500 square feet, it is open until 2 a.m. five days a week.

The Borderline Bar & Grill in Thousand Oaks, Calif.
The Borderline Bar & Grill in Thousand Oaks, Calif.

Authorities said more than 100 were inside at the time of the shooting. Scores of colleges lie within a 20-mile radius of the bar, including Pepperdine University, California State University at Channel Islands, Moorpark College and California Lutheran University, which has its own line dance club.

Pepperdine officials said that multiple students from the school were at the bar during the shooting. “University officials have been working on site with law enforcement to confirm their safety and well-being, and our prayers and condolences are with everyone impacted by this senseless act of violence,” the school said.

Claire Gietzen told an ABC affiliate that she ran behind the bar when gunshots broke out, but then joined a man who pulled down a ladder leading into the attic.

“He motioned for me to follow him. I thought that was the best option at the time,” she said. “[We heard] gunshot after gunshot. I heard glass breaking. I heard commotion and screaming. … We kept thinking it would stop for a while, that we were okay, and then it would start up again.”

The people who have ‘seen it twice’

The shooting unfolded just 13 months after 58 people were killed at a country music festival in Las Vegas, when a lone gunman opened fire from the 32nd floor of the Mandalay Bay Resort and Casino.

Some people who were at Borderline Bar on Wednesday night had also apparently survived the shooting last year in Las Vegas. Chandler Gunn, 23, told the Los Angeles Times that when he heard about the shooting, he called a friend who works at the bar and who was also at Las Vegas festival.

A woman who fled the Borderline Bar and Grill where is hugged by relatives in Thousand Oaks, Calif. (Mike Nelson/EPA-EFE/REX)
A woman who fled the Borderline Bar and Grill where is hugged by relatives in Thousand Oaks, Calif. (Mike Nelson/EPA-EFE/REX)

“A lot of people in the Route 91 situation go here,” Gunn told the newspaper about the tragedy in Las Vegas. “There’s people that live a whole lifetime without seeing this, and then there’s people that have seen it twice.”

What we know about the gunman

Special weapons and tactics teams arrived on the scene, along with the FBI. Video from the scene showed bar-goers rushing injured people to medical response vehicles.

When the authorities reentered the nightclub, they found the suspect — whom they believe to be the lone gunman — dead inside, Dean said.

“We don’t know who shot the deputy,” he added. “We don’t know who shot anybody at this point.”

He said that authorities have not yet identified the suspect.

Matt Wennerstrom, a regular at the bar, described the shooter as a “tall figure,” over 6 feet, wearing “all dark clothing.” He said he saw the gunman open fire on employees working at the front of the bar.

“At that point I grabbed as many people around me as I could and pulled them down underneath the pool table that we were closest to until he ran out of bullets for that magazine and had to reload,” the eyewitness said.

During the pause, Wennerstrom, 20, said he and others threw bar stools through a window and helped people escape. He told ABC he was able to push “30 or 35 people through that window.”

Other witnesses said the gunman was wearing black, including a hoodie.

A man and his stepfather interviewed by ABC said they heard about 12 shots before they were able to exit through the front door of the nightclub.

“He fired the first shot,” the stepfather said. “And I knew it was real. My son thought it was a joke, so I pulled him down and got some cover. I looked up, and he was moving to the right. He shot the front doorman, who was just a young man. Then he shot the cashier, just a young girl.”

Multiple eyewitnesses described seeing smoke, possibly from smoke bombs.

Rochelle Hammons, 24, told The Post that she heard four shots before she was able to flee.

“All of a sudden we heard four shots, you know, ‘bang, bang, bang, bang.’ Everyone got down on the floor. Everyone ducked and covered each other,” she said. “As everyone crouched down on the floor, I figured that my only chance would be to run out to the nearest exit.”

“I saw the nearest exit, and I ran out as fast as I could.”

From inside her car, she saw the first police officer arrive, she said. She rolled down her window and told him there was an active shooter inside.

“You’ve got to hurry, you’ve got to get in there,” she urged him.

Antonia Noori Farzan, Meagan Flynn, Kyle Swenson, Fred Barbash, Alex Horton, Amar Nadir and Matt Zapotosky contributed to this report, which is being updated regularly.

Law enforcement has a blind spot for white male violence. Here’s why.

For years, white men have been responsible for mass shootings in far greater numbers than other demographic groups

He was planning a mass shooting in Texas. His grandmother stopped him.

Police later recovered an AK-47 rifle and 17 magazines loaded with ammunition from his hotel room

‘He is not welcome here’: Rep. Veronica Escobar says she’s skipping Trump’s visit to El Paso

Escobar’s district includes the El Paso Walmart and shopping center where 22 people were killed Saturday