At least 13 people are dead, including a sheriff’s sergeant and the gunman.

Police identified the gunman as Ian David Long, a 28-year-old military veteran.

The attack took place during Borderline Bar & Grill’s “Country Night” for college students.

THOUSAND OAKS, Calif. ― Thirteen people are dead after a shooter opened fire late Wednesday at a popular college bar roughly 40 miles northwest of downtown Los Angeles.

Police officers headed to Borderline Bar & Grill in Thousand Oaks around 11:20 p.m. after receiving multiple calls of shots fired, said Ventura County Sheriff Geoff Dean. It was “College Country Night” at the bar and the dance floor was full of students from nearby universities.

A sheriff’s unit and two highway patrol officers responded to the calls for help. Ventura County Sgt. Ron Helus and a patrol officer went in through the front door, at which point Helus was struck multiple times with gunfire. The patrol officer rescued Helus out of the line of gunfire, but Helus later died from his injuries.

Additional units arrived and recovered a single handgun, officials said. At least 23 others were injured in the attack, a spokesman for the Ventura County Fire Department told HuffPost. Some of the injured were rescued and taken to local hospitals, and others with minor wounds took themselves to hospitals.

“It’s a horrific scene in there,” Dean said, adding that people were found hiding in bathrooms and attics.

He described Helus, a 29-year law enforcement veteran, as a “hard-working, dedicated sheriff’s sergeant.”

“He was totally committed,” Dean said. “He gave his all, and tonight, as I told his wife, he died a hero. He went in to save lives, to save other people.”

Police identified the suspect in the shooting as Ian David Long, 28. He was a student at California State University at Northridge who last attended in 2016, the school confirmed. He was also a U.S. Marine Corps veteran, according to authorities. Police had met with him earlier this year but he wasn’t arrested.

Long likely shot himself, officials said. He had legally purchased the .45-caliber handgun he used during the shooting, but had outfitted it with an extended magazine that isn’t legal to purchase in California under a 2000 law. It’s unclear when and where he purchased the magazine.

Long deployed a smoke device during the attack, an official told the Associated Press. Authorities haven’t speculated on a motive.

Borderline, which bills itself as the “biggest dance floor in town,” is a popular spot for college students from nearby California Lutheran University, Moorpark College and Pepperdine University.

Emotional community members on Thursday morning trickled in and out of the Thousand Oaks Teen Center, waiting for information on missing friends and family members.

“Last night and today is going to be a very difficult day for many, many people,” Thousand Oaks Mayor Andy Fox told a crowd of reporters outside the center, which was blocked off by tape.

Fox said he isn’t sure how many people are injured, but that officials have begun notifying victims’ next of kin.

A vigil is scheduled for Thursday evening.

Police had yet to identify any of the victims, but Jason Coffman told reporters that his 22-year-old son Cody was among the dead.

“Oh Cody, I love you so much,” he said, sobbing and wiping his tears with a tissue. “I cannot believe it has happened to my family. I am speechless and heartbroken.”

Justin Meek, a 23-year-old graduate of California Lutheran University and reportedly the bar’s bouncer, died after he “heroically saved lives in the incident,” according to the school. Alaina Housley, the 22-year-old niece of actress Tamera Mowry-Housley, was also killed in the attack, her family said.

Sean Adler, 48, was also named as a victim who was fatally shot by the suspect, ABC and CBS both reported.

Holden Harrah, 21, (right), who witnessed the shooting at Borderline Bar & Grill late Wednesday, hugs family and friends. (Al Seib via Getty Images)

Capt. Garo Kuredjian of the sheriff’s office told reporters that “hundreds” of people may have been inside the bar at the time of the attack. He described Thousand Oaks as “a very safe community” where shootings don’t “happen very frequently.”

Officials called on community members to donate blood to help those injured in the shooting.

A blood drive had already been scheduled for Thursday at La Rena High School and Middle School, located about two miles north of Borderline Bar & Grill. The school opened its event to the public in the wake of the shooting, drawing hundreds of donors to show up.

A witness told KABC-TV that there were many young people “having a great time” in the bar when a man entered and began shooting. Several witnesses said they saw the gunman shoot multiple people and deploy “smoke bombs.”

Margot Marty, 27, said she was on the dance floor because one of her favorite songs had just started playing when she heard shots. She turned to see a man dressed in black standing at the entry to the bar, firing rapidly.

Marty, a French national living in the U.S., described a scene of chaos that followed. People helped one another off the ground and toward a back exit, where Marty said she saw a man break a window using only his body so people could flee more quickly.

“I stayed behind because my friend was towards the bar when it happened and I just wanted to go back to get her or find her,” she said. Both Marty and her friend made it out of the bar.

Outside the bar, Marty said survivors huddled behind cars and helped people who had been lightly injured in the scuffle — one had twisted a knee. The bar patrons found refuge at neighboring houses, where people offered water and first aid.

Six off-duty police officers were also inside the bar at the time of the shooting, Ventura County Sheriff Dean told reporters. He said a mother told him the officers stood in front of her daughter, protecting her from the spray of bullets.

“Borderline is honestly that place you wanted to be after a long hard day, to be around the people who love the same music and have the same interests as you,” Marybeth Schroeder, a promoter for the bar, told HuffPost.

“Having a bad day? Go to Borderline. Long day at work? Go to Borderline. Your boyfriend just broke up with you? Go to Borderline. Your dog just passed away? Go to Borderline.”

Hayley Miller, Andy Campbell and Nick Wing contributed reporting.