This 2017 photo from the California Department of Motor Vehicles shows Ian David Long. Authorities said the Marine combat veteran opened fire Wednesday evening, Nov. 7, 2018, at a country music bar in Thousand Oaks, killing multiple people before apparently taking his own life. (California Department of Motor Vehicles via AP)

THOUSAND OAKS – The gunman who killed 12 people at a country music bar in Southern California went on social media during the attack and posted about his mental state and whether people would believe he was sane, a law enforcement official said Friday.

Also, one of the possibilities investigators are looking into is whether gunman Ian David Long believed his former girlfriend would be at the bar, the official said.

Authorities have not determined a motive for Wednesday’s night rampage at the Borderline Bar & Grill.

The official — who was briefed on the investigation but not authorized to discuss it publicly and spoke to The Associated Press on condition of anonymity — would not give additional details on what the 28-year-old former Marine posted on his Facebook and Instagram accounts.

Neither Facebook nor Instagram had any immediate comment.

Long, a former machine gunner who served in Afghanistan, opened fire with a handgun during college night at the bar, then apparently killed himself as scores of police officers closed in.

As investigators worked to figure out what set him off, President Donald Trump blamed mental illness, describing the gunman as “a very sick puppy” who had “a lot of problems.”

Investigators have not commented on whether mental illness played a role in the rampage. But a mental-health specialist who assessed Long after police were called about his agitated behavior last spring worried he might be suffering from post-traumatic stress disorder.

The incident happened in April, when one of the loud and repeated fights he had with his mother at the home was so bad that a next-door neighbor called police. The mental-health specialist concluded there were no grounds to have him involuntarily committed.

At the White House, Trump touted his efforts to fund work on PTSD among veterans. He declined to engage on questions on whether the nation needs stricter gun control laws.

The dead in the shooting rampage included sheriff’s Sgt. Ron Helus, a 29-year veteran gunned down as he entered the bar, and Telemachus Orfanos, 27, who survived last year’s massacre in Las Vegas, where a gunman in a high-rise hotel opened killed 58 people at an outdoor country music festival.

Authorities in Thousand Oaks described an assault of military efficiency. None of those injured was hurt by gunfire, authorities said. Instead, when Long shot, he killed.

“Every Marine is trained in urban warfare and indoor gun fighting,” said Marc Bender, an instructor for emergency responders in Riverside County, California. “Every Marine is a marksman.”

Julie Hanson, who lives next door to the ranch-style home that Long shared with his mother, described him as “odd” and “disrespectful” well before he left home a decade ago, got married and enlisted in the Marines. She could often hear him yelling and cursing, but several months ago unusually loud banging and shouting prompted her husband to call authorities.

“I was concerned because I knew he had been in the military,” Tom Hanson said.

About 18 months ago, Don and Effie MacLeod heard “an awful argument” and what he believes was a gunshot from the Longs’ property. Don MacLeod said he did not call police but avoided speaking with Ian Long.