Searching for a motive, authorities in California are scouring the life of 28-year-old Ian Long, a former Marine who dressed entirely in black and used a legally purchased handgun to shoot up a country music bar, killing 11 students and a deputy sheriff who responded to the violence.

Long targeted the Borderline Bar and Grill in Thousand Oaks late Wednesday, where witnesses said he loosed smoke grenades inside the building before shooting.

The violence comes just months after police and mental health specialists were called to his home by neighbors but decided he did not meet the standards to be committed involuntarily.

Long was in the Marines from 2008 to 2013 and toured Afghanistan, earning 10 medals.

Investigators say they believe he killed himself after his shooting spree, which took the lives of sheriff’s Sgt. Ron Helus and 11 others.

The London Daily Mail said Long apparently committed suicide in a bar office, where his body was found after the gunfire ended.

The report said he was awarded two Navy Meritorious Unit Commendations, a Combat Action Ribbon, a Good Conduct Medal, an Afghanistan Campaign Medal, a National Defense Service Medal and others while in the service before he was discharged in 2013.

He later went to college but eventually dropped out.

The Daily Mail said a neighbor, Richard Berge, 77, confirmed Long’s mother feared he would injure himself, and the community was concerned he suffered from PTSD.

The FBI on Thursday cordoned off his home with crime-scene tape, and agents were awaiting permission from a judge for a thorough search.

Police said there another dozen with minor injuries.

Survivors said Long was dressed in all-black, wearing a baseball cap, sunglasses and a mask covering the bottom part of his face,” the Daily Mail reported.

He walked up to the entrance at 11.20 p.m. and shot the bouncer before entering the bar.

Smoke grenades and shots followed.

Witness said the shooter said nothing before the attack.

NBC News said the weapon was identified as a .45-caliber Glock handgun that had been purchased legally but had had its magazine modified to hold more ammunition.

Ventura County Sheriff Geoff Dean said, “It appears he walked up to the scene, shot the security guard that was standing outside, stepped inside, turned to the right, shot several other security and employees and began opening fire inside the nightclub.”

The sheriff said there was no indication yet of a motive.

Helus, 54, was a 29-year veteran of the sheriff’s department.

Authorities said they found people hiding in the attic, in restrooms and under tables.

Others had used bar stools to break windows and flee.

“Kayla Simmons said she was inside the bar when shots were fired directly behind her. She said she could still hear the shots when she escaped outside into the parking lot,” NBC reported.

Reuters noted it was the third mass shooting in the country in recent days, following the deaths of two women at a yoga class in Tallahassee, Florida, and 12 days after a gunman killed 11 worshippers at a synagogue in Pittsburgh.

Rep. Jerrold Nadler, the top Democrat on the House Judiciary Committee, promised lawmakers would work on universal background checks soon, Reuters said.

President Trump credited the bravery of the police with saving many lives.

Note: Read our discussion guidelines before commenting.