Undated photo of Ian David Long, the suspect the mass shooting at a bar in Thousand Oaks, California, during his time in the U.S. Marine Corps is seen on the Facebook page of his mother, Colleen Long.

Dean said police had several minor run-ins with the alleged mass shooter, including an incident last April in which deputies were called to his home in Newbury Park on a report that he was acting erratically. He said detectives are investigating whether Long suffered from post-traumatic stress disorder.

Colleen Long/Facebook

Undated photo of Ian David Long, the suspect the mass shooting at a bar in Thousand Oaks, California, during his time in the U.S. Marine Corps is seen on the Facebook page of his mother, Colleen Long.

"In April of this year, deputies were called to his house for a subject disturbing [the peace incident]," Dean said. "They went to the house, they talked to him. He was somewhat irate, acting a little irrationally. They called out our crisis intervention team, our mental health specialist, who met with him, talked to him and cleared him."

Dean said that the mental health specialist didn't feel Long was qualified to be taken "51-50," a California penal code designation for someone that needs to be involuntarily committed for psychiatric evaluation to protect themselves or others.

"He was left at that scene last April," Dean said.

Suspect's military background

Long served in the Marine Corps from 2008 to 2013 and achieved the rank of corporal as a machine gunner, according to his military record obtained by ABC News. He was deployed to Afghanistan from Nov. 16, 2010, to June 14, 2011.

Colleen Long/Facebook

Undated photo of Ian David Long, the suspect the mass shooting at a bar in Thousand Oaks, California, during his time in the U.S. Marine Corps is seen on the Facebook page of his mother, Colleen Long.

During his military career, Long was awarded the Navy Unit Commendation, a Navy Meritorious Unit Commendation and a Combat Action Ribbon. He was also the recipient of the Marine Corps Good Conduct Medal, Sea Service Deployment Ribbon, an Afghanistan Campaign Medal, a Global War on Terrorism Service Medal and a National Defense Service Medal.

"The Corps extends its deepest condolences to the families of the victims in this senseless tragedy," the Marine Corps said in a statement Thursday.

After leaving the military, Long enrolled at California State University Northridge and attended classes through 2016, but did not graduate, university officials said in a statement.

Long was once a victim

In January 2015, Long was the victim of a battery at another bar in Thousand Oaks that deputies were called to investigate, Dean said.

Long was also involved in a traffic collision that his department investigated.

Facebook

An undated photo of suspected Thousand Oaks shooter 28-year-old Ian David Long from his Facebook account.