Sheriff Geoff Dean, who is set to retire on Friday, said Long may have suffered from post-traumatic stress disorder and was known to law enforcement officials due to several unspecified "contacts" stretching back multiple years.
A next-door neighbour said he called authorities about six months ago when he heard loud banging and shouting at Long's home. "It can happen anywhere". That exit leads to a patio where people smoke.
Here's what we know about the late Wednesday shooting.
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. Some threw barstools through windows to escape.
On Thursday, authorities provided an update on the shooting.
An American flag hung on the garage at Long's home on Thursday as law enforcement gathered outside.
"He died tonight going in to try to save others and paid the ultimate sacrifice", Dean said. It's unclear whether the magazine was legally purchased.
People wait in line to donate blood outside LaReina High School after a mass shooting by a lone gunman at a bar in Thousand Oaks, Calif., Nov. 8, 2018.
Sheriff's Sgt. Ron Helus and a passing highway patrolman were responding to several 911 calls when they arrived at the Borderline Bar & Grill in Thousand Oaks at about 11:20 p.m., the sheriff said.
Twenty-three people were injured - some from "jumping out of windows, diving under tables", Dean said - and treated at area hospitals. Once safely outside, the uninjured hugged and awaited word about those still inside.
The shooter has been identified as Ian David Long, a 28-year-old former US Marine with mental health problems.
Long was a veteran and served in the U.S. Marine Corps.
Court records show Long was married as a 19-year-old in Honolulu in June 2009, and he and his wife separated in June 2011 while he was deployed to Afghanistan.
Kuredjian said the shooter no longer posed a threat to surrounding communities, but could not confirm if he was shot dead or captured.
Police have not identified a motive.
In April this year, deputies were called to his house for a disturbance and found him "acting a little irrationally". A mental health crisis team determined at that time that he should not be taken into custody, the AP reported.
California State University, Northridge, said in a statement that Long was a student, last attending in 2016, but offered no further details.
By the time they entered the bar again, the gunfire had stopped, according to the sheriff.
The wife of a Sheriff's Sergeant killed in Wednesday night's California bar massacre walked behind his hearse at the start of a huge memorial procession. He also wrote, "God bless all of the victims and families of the victims". "Thank you to Law Enforcement", the president said in another tweet.
The PBS NewsHour will update this story as it develops.