A Marine veteran armed with a handgun opened fire during a college night at a Southern California bar on Wednesday, killing 11 people and a veteran sheriff’s deputy before turning the gun on himself, authorities said.

The gunman, identified by authorities as 28-year-old Ian Long, allegedly shot his way into the Borderline Bar & Grill in Thousand Oaks north of Los Angeles, firing on about 200 people enjoying a country-music night for patrons 18 and older with a .45-caliber handgun outfitted with an extended magazine, Ventura County Sheriff Geoff Dean told reporters Thursday morning.

Up to 15 other people suffered minor injuries including scrapes, cuts, and bruises as they fled the bullets, Dean said. At least one other person suffered a gunshot wound.

A motive for the shooting was not immediately clear, the sheriff said. Long, who served as a machine gunner in the U.S. Marine Corps from 2008 to 2013 and completed an seven-month tour in Afghanistan, was found dead inside the bar from what appeared to be a self-inflicted gunshot wound. Investigators, including the FBI, were searching for a social-media profile and waiting on warrants to search Long’s car and home.

Authorities were also probing a mental-health call officers made to Long’s home in April 2018 in which officers determined he was “irate” and “acting a little irrationally.” Mental-health professionals dispatched to the scene discussed his military service, asked about signs of post-traumatic stress disorder and ultimately determined he was not a danger to himself or others.

Dean said that Long had purchased the gun used in Wednesday’s shooting legally. Investigators were working to determine when the gun was purchased and it was not clear if Long had the gun in his home during the April visit or if police could have done anything to confiscate it.

The shooting took place around 11:20 a.m. Wednesday night.

Police described a chaotic scene in which people broke windows, ran through fire exits, cowered under tables, and sought refuge in an attic. At least six unarmed off-duty police officers, moonlighting as security guards Wednesday night, were at the bar. A parent told Dean that at least one of the guards “stood in front of my daughter” to protect her from bullets.

Authorities were still working to determine the names of the victims Thursday morning, but one of the first people killed was a law-enforcement officer who charged into the bar and was met by a barrage of bullets: Sgt. Ron Helus of the Ventura County Sheriff’s Office. Helus was on the phone with his wife, having one of several conversations he typically had with her during his shift, when he told her he had to respond to a call. He was shot during a gun battle with Long as he entered the building, the sheriff said.

Witnesses who were at the entrance to the club told ABC7 that a gunman dressed in black shot the doorman and the cashier at the front desk.

“He shot the doorman, just a young man, he shot the cashier, just a young girl,” a man only identified as Tim said. “He just started shooting and I should have stayed until he changed his clip but I was worried about my boy. I should have stayed, I apologize to anybody who got hurt. I’m sorry. They’re all young, I’m 56, I’ve lived a life. They’re all young. This shouldn’t happen.”

According to witnesses and a law-enforcement official speaking to the Associated Press, Long threw smoke grenades into the building. Police were also working to determine if Long reloaded the gun during the rampage.

A preliminary investigation determined that Long drove his car outside the bar, walked up to the entrance and began shooting, striking a security guard who was stationed outside, Dean said. Just inside he shot several other security members and employees before continuing inside the club.

About two-and-a-half minutes after initial reports of the shooting, Sgt. Helus and a highway patrol officer entered the building, authorities said. Helus was hit “multiple times” with gunfire, the sheriff said, and died at a local hospital as a result of his injuries.

In the aftermath of the Columbine school shooting in Colorado nearly two decades ago, officers are now trained to “immediately engage the target and to stop the shooting,” Dean said, adding that “there is no doubt they saved lives by going in. It could have been much much worse.”

Helus was a 29-year veteran who, according to the sheriff, planned to retire next year. “Ron was a hardworking, dedicated sheriff's sergeant,” the sheriff said, breaking down as he described his long-time colleague. “He was totally committed. He gave his all and tonight, as I told his wife, he died a hero because he went in to save lives, to save other people.”

Teylor Whittler, 19, told reporters that she was on the dance floor with friends when she heard the first shot.

“I heard the gunshot, I turned around, and I saw him shoot a couple more times,” she said. “In a split second, everyone yelled ‘Get down!’ I ran to the left of the dance floor where the back door is and everyone pretty much piled on top of each other. It was silent for a couple of seconds then all of a sudden a couple of guys that were closer to the bar started running toward the back door and said ‘Get up! He’s coming!’”

Whittler said the gunman appeared to be an experienced shooter.

“He had two rounds [magazines] that I know with him. He changed them within about six seconds, which is really fast, so he knew what he was doing. He also had perfect form. When I look back, he was spot-on.”

The eyewitness confirmed that it was college night at the nightclub. Students from Pepperdine University in Malibu were also at the event, the school said in a statement.

“There were just young people, like young, 18, 19, 20, just having a great time,” Tim said. “Then this maniac came in and started shooting at people for no reason at all. These people never hurt anyone in their lives, they’re just kids. They’re just kids.”

Tim was at the front door with his stepson, John Hedge, when the shooting started.

“I just started hearing these big pops,” Hedge told reporters. “Pop, pop, pop. There was probably three or four, I hit the ground. I look up—the security guard is dead. Well, I don't want to say he was dead, but he was shot. He was down. The gunman was throwing smoke grenades all over the place. I saw him point to the back of the cash register… and he just kept firing. I ran out the front door.”

Other eyewitnesses described how they smashed windows with barstools in a desperate bid to escape. Hundreds of people are believed to have been inside the building at the time of the attack. Others hid in restrooms, basements, and attics as the gunman fired.

FBI agents were on the scene in California and officials at bureau headquarters in Washington, D.C., were expected to gather for prescheduled meetings Thursday about the threat of mass-casualty attacks, according to two individuals with knowledge of the agency’s schedule.

Over the past four years, the FBI has been working with outside consultants on developing a strategy to prevent attacks like the shooting in Thousand Oaks. Those plans include strengthening communication between federal law enforcement and local authorities as well as developing systems to help analyze the the characteristics of those who carry out the attacks.

The Department of Homeland Security is also tasked with mitigating mass-casualty attacks carried out by those living in the U.S. However, under the Trump administration, the department has focused its efforts instead on the threat posed by foreigners, current and former officials told The Daily Beast.

That focus comes as a direct result of President Trump’s direction and his push to bolster his base, said John Cohen, the former deputy undersecretary for intelligence and analysis at DHS.

“Over the past two years during this administration, we have seen multiple mass-casualty attacks that have lead to hundreds of casualties. This needs to be much higher priority for the Department of Homeland Security and the administration as a whole,” Cohen said. “Instead of spending $200 million to send the military to the border, that money would be better served in local communities to help them deal with these threats.”

Kenneth Strange, a private investigator living in Thousand Oaks who worked for more than 20 years in federal law enforcement, including the FBI and the Department of Justice’s Office of Inspector General, said he woke up to the news in the early morning after receiving a call from his sister-in-law.

“She said ‘I’m so sorry’. I was like, sorry about what?,” Strange said. “I turned on the TV and saw all the commotion. It’s pretty unbelievable. This town was once voted the safest small city in the U.S.”

Strange said he had recently attended a function for the local rotary club at the bar. “That’s what is most terrifying. That place was packed when we were there,” Strange said. “I know the layout of the restaurant and bar. I can still see the security out there seeing us in.”

Given the news of the mass shooting, Strange said he is now considering purchasing a gun.

“I am not a gun nut. I have always shied away from gun even though I was asked to carry for my work,” Strange said. “Now I think I might obtain a concealed weapons permit. I get out and involved in all sorts of organizations including the rotary and Church. It would be nice to protect yourself and some other people.”