Here's what we know about the gunman who killed 12 at a California bar

This browser does not support the video element.

THOUSAND OAKS, Calif. — Using a smoke bomb and a handgun, a hooded gunman dressed all in black opened fire during “college night” at a country music bar in Southern California, killing 12 people and sending hundreds running in terror, authorities said Thursday. The gunman then apparently killed himself.

What we are learning about the shooter, for Channel 2 Action News at 5 p.m.

[12 dead, more injured in California bar shooting, authorities say]

The killer was identified as Ian David Long, a 28-year-old former Marine, who lived in nearby Newbury Park and had attended to California State University.

Our sister station ABC 7 said Long served in the Marine Corps from 2008 to 2013, at one point deployed to Afghanistan. He was ranked as a corporal as a machine gunner. U.S. Defense Department spokeswoman Jessica Maxwell said he received an honorable discharge.

Court records show he married in 2009, separated in 2011 and was divorced in 2013.

Ian David Long.

On Wednesday night, Long, entered the Borderline Bar and Grill in Thousand Oaks dressed in black with his face partly covered, witnesses said.

Dean said the gunman immediately shot a security guard after entering the bar, turned to the right and shot several other security officials, employees and patrons.

Long deployed a smoke device and used a .45-caliber handgun with an extended magazine, ABC News reports.

The motive is not clear and is under investigation, law enforcement sources said.

Ventura County Sheriff Geoff Dean said his department had several previous contacts with Long, including a call to his home in April, when deputies found him angry and acting irrationally. The sheriff said a mental health crisis team was called at the time and concluded Long did not need to be taken into custody.

"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."

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.

One neighbor who knew Long told our ABC affiliate ABC 7 that 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 Long's mother, told ABC 7 that Long's mother was worried about her son.

"He wouldn't get help," Berge said.

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.

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.

The Associated Press, ABC News and ABC 7 contributed to this report.