Tiffany Azpeitia, 26, left, and Jamie Eads, 23, both of Thousand Oaks, line up to donate blood for victims of the Borderline Bar and Grill mass shooting. “It is hard, everyone is like family there,” said Eads.

(Gary Coronado / Los Angeles Times)

2/50

Hundreds line up at La Reina High School in Thousand Oaks to donate blood for victims of the Borderline Bar and Grill mass shooting.

(Gary Coronado / Los Angeles Times)

3/50

Comdr. Christopher Dunn escorts relatives of Ventura County Sheriff’s Sgt. Ron Helus as officers salute them near the entrance to the coroner’s office.

(Mel Melcon / Los Angeles Times)

4/50

Members of the Ventura County Sheriff’s Dept. salute as a hearse carrying the body of Sgt. Ron Helus arrives at the coroner’s office in Ventura.

A hearse carrying the casket of Sgt. Ron Helus heads north on the 101 Freeway past the Borchard Road overpass toward the medical examiner’s office in Ventura.

(Al Seib / Los Angeles Times)

9/50

Crowds watch the procession carrying the flag-draped casket of Sgt. Ron Helus to the medical examiner’s office in Ventura.

(Al Seib / Los Angeles Times)

10/50

Ventura County sheriff’s cadets and Oxnard College Fire Academy cadets salute on the Las Posas Road overpass of the 101 Freeway as the procession carrying Sgt. Ron Helus heads to the medical examiner’s office in Ventura.

(Michael Owen Baker / For The Times)

11/50

Jaclyn Copeland and her son, Noah Campa, 5, watch from the Borchard Road overpass of the 101 freeway as the procession passes.

A former U.S. Marine machine gunner who may have suffered from post-traumatic stress disorder burst into a Thousand Oaks bar packed with college students late Wednesday night, tossed a smoke bomb into the crowd and opened fire, authorities said.

Eleven people were killed, in addition to a sheriff’s sergeant responding to the scene who was gunned down by the assailant minutes later.

The Borderline Bar and Grill was hosting line-dancing lessons for college students as young as 18 on Wednesday night. Crowds of young people, including parties for two women celebrating their 21st birthdays, were drinking and dancing when the crack of gunfire echoed through the cavernous room about 11:20 p.m.

Terrified patrons scrambled for cover as bullets flew. Some crouched behind pool tables and in bathroom stalls, fumbling with phones as they tried to call and text their loved ones. Others used barstools to break second-story windows in an attempt to jump to safety.

Nellie Wong’s friends at Cal State Channel Islands in Camarillo had surprised her Wednesday night and taken her out to celebrate her 21st birthday. As the shooting started, she dived to the floor and hid behind a group of tables and barstools, squeezing her nose closed with her hand to avoid choking on the smoke.

“I immediately stopped moving, stopped breathing,” said Wong, who still wore a bright pink cowboy hat and a “Happy Birthday” sash. “Thank goodness, he didn’t see me at all.”

The shooting left 12 people dead and 18 others injured, some who were hurt trying to escape. The severity of their injuries was not immediately known, fire officials said.

The suspected gunman, Ian David Long, was found dead of a gunshot wound in a back room at the bar. The amount of blood inside the bar made it difficult to tell whether he shot himself or was killed by law enforcement, Ventura County Sheriff Geoff Dean said.

Long, 28, lived in Newbury Park, five miles from the dance hall. He drove his mother’s red Toyota pickup to the Borderline and did not say anything before opening fire, a law enforcement official said.

Long was a machine gunner in the U.S. Marine Corps, reaching the rank of corporal. He served a seven-month tour in Afghanistan during his nearly five years in the service, according to the Department of Defense.

Neighbors on his manicured, leafy street said they suspected he had emotional issues. Deputies who were called to Long’s home in April for a complaint of disturbing the peace said he was irate and was acting irrationally, Dean said. Mental health workers decided he did not meet the standard for an emergency psychiatric hold.

Around 1:30 a.m. Thursday, dozens of people lined the sidewalk on Moorpark Road near the bar, their faces illuminated by flashing blue and red police lights. Employees and bar patrons huddled together, crying, hugging and asking each other whether there had been word on loved ones who were still inside.

Thousand Oaks residents said the attack had shattered their view of the suburban area as safe. Several teenagers said their parents were comfortable sending them to Borderline, next to a golf course and the 101 Freeway, because it was familiar and safe.

“This is not something that happens in Thousand Oaks,” said Capt. Garo Kuredjian of the Ventura County Sheriff’s Department. “Thousand Oaks is one of the safest communities in the United States. For something like that to hit us on our doorstep is devastating.”

“It doesn’t matter how low your crime rate is … there’s no way to process,” Dean said. “There’s no way to make sense out of the senseless.”

Jon Schleuss / Los Angeles Times

The Borderline, a barn-like bar with live music and dancing, is popular with college students and country music fans in Ventura County.

The bar’s patrons also frequent the Stagecoach country music festival in Indio, and some were also survivors of the mass shooting at the Route 91 Harvest festival in Las Vegas that left 58 dead last year.

Ventura Sheriff’s Sgt. Ron Helus had been talking to his wife on the phone, as he often did during a shift, when he received a radio call about the shooting, Dean said. Before he rushed to the scene, he told her: “Hon, I got to go, I love you. I gotta go on a call.”

Helus and a California Highway Patrol officer were the first people to run into the bar, about four minutes after the first 911 call, Dean said. Helus was shot multiple times, almost immediately, and the CHP officer dragged him out of the building and away from the line of fire.

Helus died early Thursday morning at a hospital, leaving behind his wife and a son. He was a 29-year veteran of the department who planned to retire in a year or two, Dean said.

About 15 to 20 minutes passed before a second group of officers burst into the bar and began firing. Long was found dead in a back room.

The shooter was armed with a Glock 21 .45-caliber handgun, Dean said. A source who was not authorized to speak publicly said Long legally purchased the weapon in Simi Valley.

The shooter’s weapon had an extended magazine, Dean said; he added he did not know how many bullets were in the weapon or how many the magazine could actually hold.

Evidence suggests Long worked alone and did not plan other attacks, said Paul Delacourt, the assistant director of the FBI’s Los Angeles field office. Naming a motivation for the shooting would be “premature,” he said.

“I don’t want to get out in front of what the evidence in the investigation will show,” Delacourt said.

In addition to examining evidence from the scene, the FBI will interview witnesses, examine Long’s digital footprint and review video footage from inside the bar, he said.

Matthew Wennerstrom, a Borderline regular, said he had been inside for an hour when he heard gunfire. He pulled as many people as he could to the floor and under a pool table, tried to quiet those around him and count the shots.

When the gunman stopped shooting, possibly to reload, Wennerstrom enlisted others to help smash some of the bar’s windows with chairs, hoping to escape before the next volley of gunfire.

“All I could think about was how helpless I was,” Wennerstrom said.

A video taken inside the Borderline during the shooting and shared on Instagram showed red, purple and green spotlights flickering through the smoky air onto the empty dance floor as the sound of gunshots and screams rang out in the background.

During a break in the gunfire, the man filming sprinted toward the exit, the video punctuated by his heavy breathing. He shouted, “He’s coming out this door!” before making his escape.

In the Instagram post, the man wrote that the gunman was “shooting the wounded on the ground.”

Fernan Diamse, center, cut his arm while breaking a window to escape the shooting Wednesday at the Borderline Bar and Grill in Thousand Oaks.

Mike Baker/For The Times

Large crowds formed outside the Borderline early Thursday morning as friends and family arrived seeking news about their loved ones. Some made desperate phone calls, seeking information about people still inside. Others read out the names of their friends on live television interviews.

Carl Edgar, 24, of Tarzana said he had about 20 friends inside the bar, where he is a regular. He tried to reach them early Thursday, but couldn’t contact everyone. Edgar reasoned that they may have turned off their phones “to be safe,” he said.

A hotline has been established for those seeking information about loved ones at (805) 465-6650. A family reunification center also was established at the Thousand Oaks Teen Center, where Mayor Pro Tem Rob McCoy was seen around 3:30 a.m.

McCoy embraced one couple as they walked up. Inside, he said, the mood was somber as loved ones waited for news.

Kyle Kim, Lorena Iniguez Elebee and Shaffer Grubb / Los Angeles Times

Adam Housley, who until six weeks ago was a national correspondent for Fox News, arrived at the Los Robles Regional Medical Center around 3:30 a.m., searching for his niece Alaina, 18, a freshman at Pepperdine University.

Four hours after the shooting, when victims had been evacuated, Alaina’s Apple Watch and iPhone still showed that she was at the Borderline.

Housley said he knew the grim reality of being a journalist on the scene after a mass shooting, saying: “You just don’t think that — same stupid quote — you just don’t think it’s going to happen to you.”

He learned hours later that Alaina had been killed. In a statement, Housley said she was “an incredible young woman with so much life ahead of her.”

Tim Dominguez, who has been going to Borderline for 16 years, said he wouldn’t normally go on a Wednesday because it’s college night. But his 26-year-old son wanted to go and shoot pool.

Dominguez said they were preparing to leave when he heard shots and saw the bouncer collapse. Then the gunman turned and “kept on shooting,” firing rapidly toward a crowd of about 40 people on the dance floor, he said.

“He was good at it,” Dominguez said, “like he knew what he was doing.”

Dominguez said that as he and his son ran from the bar, they yelled for people to get down. Though both of them are safe, Dominguez is wrestling with what he could have done differently.

“I feel guilty that I left,” he said. “That guilt that I could have done something more.”