A decade before he stormed a popular Thousand Oaks bar armed with a handgun this week, Ian David Long’s propensity for rage was well known to some of his teachers.

Evie Cluke, a former assistant track and field coach at Newbury Park High School, said the teenage Long sometimes traded punches with rival athletes at track meets, assaulted another female coach and showed off what appeared to be a handgun on campus.

Standing about 40 yards away, Cluke said, she could see Long holding a small, black object against his chest that resembled a pistol. By the time she alerted a supervisor, Long had driven off, and he later denied having a weapon, she said.

When Long explained why he was joining the Marines after graduation, Cluke became more unnerved. She said he told her: “I want to go and fight for my country and kill for my country.”

“A statement like that sticks in your brain when you know a kid has issues that need to be addressed,” Cluke said.

As police struggle to piece together a motive behind the massacre that left 12 other people dead inside the Borderline Bar and Grill, a troubling portrait of Long continued to emerge.

On Friday, law enforcement officials told The Times that Long was posting on Instagram during the shooting.

“We can see it from the time stamps and other evidence as well what he was doing: He would fire shots, then go on the Instagram account,” Ventura County sheriff’s Sgt. Eric Buschow said.

He said Long’s messages were publicly viewable for hours before investigators located his account, alerted Instagram and asked the company to preserve the images but take down the account.

In the posts, Long wrote that he hoped people would refer to him as “insane” and mocked the “thoughts and prayers” that are frequently offered in public statements and on social media after mass shootings, according to a law enforcement official who spoke on condition of anonymity because the person was not authorized to publicly discuss the case.

Among the dead was sheriff’s Sgt. Ron Helus, who entered the bar minutes after the shooting began and engaged in a firefight with Long.

Helus was shot several times and died at a hospital hours later. Long was found dead of a gunshot wound in the back of the bar, though it remains unclear if he took his own life or died after being shot by police.

The other 11 victims are Sean Adler, 48; Cody Coffman, 22; Blake Dingman, 21; Jake Dunham, 21; Alaina Housley, 18; Dan Manrique, 33; Justin Meek, 23; Kristina Morisette, 20; Mark Meza Jr., 20; Telemachus Orfanos, 27; and Noel Sparks, 21.

Long lived with his mother, and neighbors said the two often engaged in screaming matches. In April, sheriff’s deputies went to the home in response to a disturbing the peace call. Crisis team members decided not to detain Long, who had served in the Marines until 2013, though they discussed whether he might have post-traumatic stress disorder, authorities said.

Another of Long’s high school track coaches said he attacked her during a dispute in 2008. Dominique Colell recalled that she was trying to determine whehter he owned a cellphone that had been found by another student, and Long was shaking with rage.

“He started to grab at me,” she said. “He reached around and with one arm, groped my stomach. He grabbed my butt with the other arm.

“He was probably the only student that I was actually scared of when I coached there,” Colell said.

matt.hamilton

@latimes.com

james.queally@latimes.com

richard.winton @latimes.com

Times staff writer Dakota Smith contributed to this report.