Authorities identified the suspect as former machine gunner Ian David Long, 28, on Thursday.

Dressed all in black and with his hood pulled low, Long entered the Borderline Bar & Grill around 11:20 p.m. on Wednesday, opening fire as a number of students were gathered for a “college country night” event. At least 23 people were injured while trying to escape the veteran’s rampage, Ventura County officials report.

Long was found in dead of a gunshot wound inside the bar in an office adjacent to the entry. “We believe he shot himself,” Dean said.

Long is not believed to have had a previous criminal record, but police visited the Southern California home he shared with his mother in April over a domestic disturbance. Neighbors recalled loud and sometimes violent fights between Long and his mother, AP reports.

The motive for the shooting is still under investigation.

Long may have illegally acquired the gun used in the shooting

Law enforcement officials said Long was armed with a Glock 21, a .45-caliber semi-automatic handgun.

Long also threw smoke bombs into the crowded country music bar before shooting a bouncer, cashier and a number of patrons, AP reports. Victims dove for cover behind bar furniture as the carnage unfolded, according to witnesses. When Long stopped to reload, some used barstools to break windows and escape.

According to Dean, Long’s handgun is designed to hold 10 rounds but had an extended magazine, which is illegal in California. Dean said Long had legally purchased the weapon.

Long had a history of domestic disturbances

Police searched the Newbury Park home where Long lived with his mother Colleen on Thursday, according to AP. Neighbors recounted a history of loud, aggressive fights between the mother and son.

Law enforcement officers had previously had “several contacts” with Long over “minor events,” Dean said.

In April, Ventura County Sheriff’s Department deputies responded to a domestic disturbance complaint at the Long’s ranch-style home. The next-door neighbor, Tom Hanson, said he called the police after he heard “heavy-duty banging” and shouting, AP reports.

Law enforcement found Long “somewhat irate, [and] acting a little irrationally,” according to Dean. But the sheriff’s deputies declined to send Long for a psychiatric evaluation after he was cleared by a mental health specialist. The evaluator did warn officers that Long might be suffering from PTSD related to his military service, according to Dean.

“Obviously he had something going on in his head that would cause him to do something like this,” Dean said. He added that Long claimed to have been the victim of a violent assault at another Thousand Oaks bar in 2015.

Officials said Long purchased the gun used in the shooting shortly after the domestic disturbance in April, according to the Los Angeles Times.

Deployment in Afghanistan and failed marriage

Long enlisted in the Marine Corps at the age of 18 in 2008 and served as an infantry gunner, according to service records. He was deployed to Afghanistan from Nov. 16, 2010 to June 14, 2011. He earned the rank of corporal in August 2011 and received an honorable discharge in 2013.

“The Marine Corps extends its deepest condolences to the families of the victims in this senseless tragedy,” Capt. Joseph Butterfield, a Marine spokesman, said.

According to court records, Long got married in Honolulu in 2009. But the couple separated in 2011, while Long was on a seven-month-long deployment, and filed for divorce in May 2013 two months after his discharge. The couple’s divorce papers cited irreconcilable differences, according to AP.

Long also attended California State University and was last there in 2016, the university said in a statement to AP.

Long’s ex-roommate was ‘shocked’ to learn of the shooting

Newbury Park resident Winnet Blake, who lived with Long for several years, says he was shocked when he found out about the news.

“He was just quiet and kept to himself, he was just a roommate,” Blake tells TIME. “I was shocked, I was like ‘What the hell? This is crazy.’”

Blake and Long were roommates on two separate occasions: once in Ventura County for 8 months and then again for a year and a half in Los Angeles County. Blake says the last time they were roommates was two years ago.

Blake adds that while the two lived together, Long mostly kept to himself. Blake said that to his knowledge, Long did not keep guns around the apartment. He was not aware of his roommate being politically active.