The gunman who entered a Southern California bar Wednesday night and shot dead 12 people, including a sheriff’s sergeant, before killing himself has been identified as U.S. Marine Corps veteran Ian David Long.

Ventura County Sheriff Geoff Dean said Long, 28, was found dead in the Borderline Bar & Grill in Thousand Oaks late Wednesday. Dean said it’s believed he killed himself.

‘We thought it was a joke’: Witnesses recount the chaotic scene as a gunman opened fire:

‘We thought it was a joke’: Witnesses recount the chaotic scene as a gunman opened fire 1:26

A gunman opened fire around 11:20 p.m. PT at the crowded country-and-western bar about 65 kilometres northwest of Los Angeles, sending hundreds fleeing, including some who used barstools to break windows and escape. Police said hundreds were inside at the time.

Dean said Long first shot a security guard and other staff near the door and then patrons.

Among the dead was sheriff’s Sgt. Ron Helus, who was shot multiple times as he entered the building.

Dean said Helus, a 29-year veteran of the force who was set  to retire soon, died in hospital early Thursday.

“It’s a horrific scene in there,” Dean said during a news conference Thursday morning. “There’s blood everywhere.”

Dean said around 10 other people were injured and taken to local hospitals. Others had fled and taken themselves to hospital. People had been hiding in bathrooms and the attic of the bar, and some escaped by breaking windows, Dean said.

The mayor of Thousand Oaks said next-of-kin notifications are being prepared about the people who were killed and wounded.

Mayor Andrew Fox said it is a “very difficult day for many people.”

Jason Coffman told reporters his son, Cody, was among those killed.

“I am speechless and heartbroken,” he said.

Actor Tamera Mowry-Housley, known for the 1990s sitcom Sister Sister, and her husband say their 18-year-old niece, Alaina Housely, was among those killed.

They say their “hearts are broken” and say they are “devastated that her life was cut short in this manner.”

No other information on the victims was immediately known.

U.S. President Donald Trump praised police for their “great bravery” in the attack and ordered that flags be flown at half-mast at the White House and public buildings in the U.S., as well as at overseas diplomatic and military sites until Saturday evening, to honour the victims.

Democratic Gov.-elect Gavin Newsom, in his first public appearance since winning office on Tuesday, lamented the violence that has come again to California.

“It’s a gun culture. It’s a culture, and it’s not about being Democrat or Republican,” he said. “You can’t go to a bar or nightclub? You can’t go to church or synagogue? It’s insane is the only way to describe it … It’s become normalized.”

Gunman acted alone, police believe

Dean said Long was acting alone, armed with a Glock 21 — a .45-calibre handgun designed to hold 10 rounds plus one in the chamber. But the sheriff said the gun had an extended magazine that is illegal in California.

Long joined the marines in 2008. He served in the war in Afghanistan for seven months beginning in late 2010, the Marine Corps said, and was awarded multiple ribbons, commendations and medals.

It was not immediately clear what Long did after leaving active duty. 

California State University, Northridge, said in a statement that Long was a student, last attending the university in 2016. The statement had no further details.

Dean said his department had previous contact with Long, including a call to his home in April, when deputies found him behaving irate and irrationally.

The sheriff said a mental health crisis team was called at that time and concluded that Long did not need to be taken into custody.

Other prior encounters were a traffic accident and an incident in which Long was the victim of battery at a bar.

People walk away from the scene of a deadly shooting at a country-western bar in Thousand Oaks. (Mark J. Terrill/Associated Press)

Dean said there is nothing that would lead him to believe terrorism was the motive, but it has not been ruled out. Authorities hope to learn more when a search warrant is served at Long’s home in the nearby community of Newbury Park. 

The gunman was tall and wearing all black with a hood over his head and his face partly covered, witnesses told TV stations at the scene. He first fired on a person working the door and then appeared to open fire at random at the people inside, they said.

People screamed and fled to all corners of the bar, while a few people threw barstools through the windows and helped dozens to escape, witnesses said.  

Scenes from Thousand Oaks, where a gunman opened fire Wednesday night in country-and-western bar:

Scenes from Thousand Oaks, where a gunman opened fire Wednesday night in country-and-western bar 0:45

College student Cole Knapp, 19, was inside the bar when he saw the gunman enter and start shooting.

“I was just with friends and I saw the shooter walk in, and he reached up to the counter like he was going to put an ID or some money up on the counter to pay his cover charge,” said Knapp, who lives nearby. “And I just kind of saw it in the corner of my eye and I heard a gunshot, and I focused on him and I saw that he was holding a handgun and he continued to shoot at the girl at the front desk.”

Tayler Whitler, 19, said she was on the dance floor and her friends were at a table by the door as the gunman opened fire. She said everyone yelled “Get down!” and it was silent for a couple seconds, then she heard “Get up, he’s coming!” and people were trampling on each other to get out.

“It was really, really, really shocking,” Whitler told KABC-TV as she stood with her father in the Borderline parking lot. “It looked like he knew what he was doing.” 

In this image taken from video, a victim of the shooting is treated near the scene. (RMG News via AP)

John Hedge said that he and his stepfather were in the bar when the gunman opened fire. He told CNN’s Brooke Baldwin that it had been like any other night, with the basketball game on in the background, when he heard “pop, pop, pop.”

“You just do what you can to try … to get out of eyesight and try to get some cover,” he said.

The bar is a popular hangout for students from nearby California Lutheran University. It’s also close to several other universities, including California State University Channel Islands in Camarillo, Pepperdine University in Malibu and Moorpark College in Moorpark. The bar’s website says it hosts “College Country Night” every Wednesday.

Cal Lutheran, with about 4,300 students, has cancelled classes and said on its website that the university community is invited to gather Thursday at the school’s chapel.

The sheriff’s office said a procession will take place at 10 a.m. to transport Helus via motorcade from Los Robles Hospital to the Ventura County Medical Examiner’s Office in the city of Ventura.

Shootings of any kind are rare in Thousand Oaks, a city of about 130,000. It was named the third safest city in the U.S. for 2018 by the website Niche.

“I’ve learned it doesn’t matter what community you’re in,” Dean told reporters when asked if he was surprised this happened in Thousand Oaks. “It doesn’t matter how safe your community is. It can happen anywhere.”

People comfort each other outside the Borderline Bar & Grill. (Mark J. Terrill/Associated Press)