The shooting happened late Wednesday inside Borderline Bar & Grill. At least a dozen people were killed, including a sheriff's sergeant, Ron Helus.
Thursday morning, authorities said the gunman was found dead inside the nightclub. Ventura County Sheriff Geoff Dean said investigators believe Long fatally shot himself.
The motive behind the massacre is not clear and is under investigation, Dean said, adding that investigators found no immediate reason to believe that the Borderline Bar & Grill was specifically targeted.
MORE: Remembering Sgt. Ron Helus
Thousand Oaks shooting: Sheriff Sergeant Ron Helus was 'hard working, dedicated' and 'died a hero'
Shortly before 7 a.m., deputies swarmed a neighborhood in the Newbury Park area, focusing on a particular home, which they roped off with crime tape. Dean confirmed that home is Long's residence.
LISTEN: Law enforcement dispatch of Thousand Oaks mass shooting
Law enforcement dispatch of the Thousand Oaks mass shooting
Investigators knocked on doors of surrounding residents to find out what they may know about Long. One neighbor who knew Long said he was a veteran who suffered from PTSD. She said, "I don't know what he was doing with a gun."
Others said Long lived at the home with his mother. Richard Berge, a friend and neighbor of Long's mother, said Long's mother was worried about her son.
"He wouldn't get help," Berge said.
Dean said Long was in the United States Marine Corps. The USMC released Long's service record, detailing that he served from 2008 to 2013, deploying to Afghanistan from Nov. 16, 2010 to June 14, 2011. His ranking was a corporal as a machine gunner, the USMC said.
The Marine Corps said Long earned several awards, including a Combat Action Ribbon and a Marine Corps Good Conduct Medal. He was assigned to the 2nd Battalion, 3rd Marine Regiment, Third Marine Division in Kaneohe Bay, Hawaii.
Long had several interactions with the sheriff's department over the years, Dean said. These incidents include a traffic collision, a traffic citation as well as an instance in which Long was a victim of battery at a local bar in 2015.
Dean also described an incident In April, when deputies were called to his Newbury Park home regarding a disturbance.
"He was somewhat irate, acting a little irrationally. They called out our crisis intervention team, our mental health specialist," Dean said.
Those specialists ended up clearing him because they "didn't feel he was qualified to be taken under 5150," Dean said, referencing the California law code for the temporary involuntary psychiatric commitment of individuals who present a danger to themselves or others due to signs of mental illness.
His gun, which was a .45-caliber handgun, was purchased legally, Dean said. The Associated Press reports that he also deployed a smoke device. Dean said he has yet to confirm the use of such a device, though several witnesses alluded to it.
What we know about Thousand Oaks shooting suspect Ian David Long
Dean said investigators believe Long fatally shot himself after the massacre.
"When the officers went in and made re-entry, they found him already deceased," Dean said. "He was found inside an office just adjacent to the entry to the bar."
Dean could not elaborate on Long's state of mind.
"Obviously, he had something going on in his head that would cause him to do something like this. So he obviously had some sort of issues," the sheriff said.
PHOTOS: Mass shooting at nightclub in Thousand Oaks, California
President Donald Trump wrote on Twitter, "God bless all of the victims and the families of the victims."
ABC News and the Associated Press contributed to this report.