A 28-year-old Marine Corps veteran armed with a semi-automatic pistol with an extended magazine killed at least 12 people, including a sheriff's officer, and injured more than 20 others at a bar in Southern California late Wednesday night before apparently committing suicide, according to officials.

According to police, the gunman burst into the Borderline Bar and Grill in Thousand Oaks, Calif., during "College Night" at the western-themed dance bar northwest of Los Angeles and opened fire.

Sgt. Ron Helus, a 29-year veteran of the Ventura County Sheriff's Department, was wounded while responding to 911 calls reporting the shooting and died later at the hospital, officials said.

The gunman, identified as Ian David Long, 28, apparently killed himself, said Ventura County Sheriff Geoff Dean. Long, a Marine Corps veteran, was armed a legally purchased Glock .45-caliber pistol that had an illicit extended magazine that held more than the 10 rounds permitted in California.

Dean said deputies visited Long's house in April in response to a disturbance and found him acting irrationally. A mental health expert examined Long but determined that his condition did not rise to the level of an involuntary commitment to a hospital, Dean said.

"It's a horrific scene in there, there is blood everywhere and the suspect is part of that, and I didn't want to get that close and disturb the scene and possibly disturb the investigation," Dean said earlier.

He said Helus "died a hero. He went in to save lives."

Among the people at the bar when the gunman opened fire were survivors of a 2017 mass shooting at the Route 91 Harvest music festival in Las Vegas, several friends told the Los Angeles Times.

"There's people that live a whole lifetime without seeing this, and then there's people that have seen it twice," Chandler Gunn, whose friends were at the bar at the time of the shooting, told the Times.

>> READ MORE: Strict state gun laws save lives of children and teens, Stanford study finds

The deadly mass shooting at the Borderline Bar and Grill comes less than two weeks after a gunman killed 11 Jewish congregants at the Tree of Life synagogue in Pittsburgh on Oct. 27.

"The largest mass shooting in this country in 12 days. Let that sink in," CNN anchor John Berman said Thursday morning.

Here's the latest of what we know:

• Multiple students from Pepperdine University in Malibu, Calif. were at the bar when the gunman opened fire, according to the school.

• Witnesses reported that the gunman apparently threw smoke bombs at the start of his attack shortly after 11 p.m. Wednesday (2 a.m. Thursday Philadelphia time).

• The FBI and the ATF have joined the investigation.

• Officials said there was no immediate indication that the shooting was terrorism-related, and that no assault weapon had been found at the bar.

• President Trump has been briefed on the shooting.