THOUSAND OAKS, Calif.— The gunman who killed a dozen people at a Thousand Oaks bar and dance club has been depicted as a troubled loner, tormented by demons from his time as a Marine in Afghanistan.

But one of Ian David Long’s high school coaches said she saw serious signs of trouble and aggressive behavior in the months before he graduated from Newbury Park High School a decade ago.

One-time coach Dominique Colell Ballard said Long was a senior sprinter on the track team when he defied her authority during one practice — barking out repeated profanities — before grabbing and groping her at another practice.

Ballard said her attempt to discipline the teenager by throwing him off the track team was thwarted by other coaches and school administrators, who said they did not want to derail Long’s dream of joining the Marine Corps.

“So I let him back on the team. And every day after that he would show up with a big old smile on his face. It was very uncomfortable,” said Ballard, now 38 and living in nearby Camarillo. “The feeling I got was that he felt like he got away with it. He felt like he won.”

Ian Long, 28, who is a veteran of the Marines, has been identified as the shooter at the Borderline Bar and Grill in Thousand Oaks, California. via Facebook

Ballard said she had returned to her alma mater, Newbury Park High, and was working the part-time job as head girl’s track coach in 2008. She also was responsible for attendance and discipline for both the boy’s and girl’s track teams, when Long joined as a senior. Before that, he had spent his springs playing baseball.

One afternoon, Long violated a team rule by using profanity. Ballard ordered him to run one mile, the standard punishment for swearing, Ballard recalled. But as he completed each lap, for about a dozen laps, the teenager repeatedly shouted a new round of profanities at his coach.

With each new broadside, Ballard added another mile to his punishment, until she required a total of 13 miles.

“A couple of the girls on the team heard him and they were just dumbfounded that he would keep doing it,” said Ballard, who is now a mother of two. Ballard said she required the defiant Long to run all, or most, of the distance.

Weeks later at another afternoon practice at the school, which is just 10 minutes from the site of Wednesday’s shooting, Ballard said she was trying to determine who owned a phone that turned up missing. Ballard ran at her, screaming at her to give back his phone.

“'Give me the phone, give me the phone, give me the phone,’ he just kept screaming,” recalled Ballard. Given his aggressive behavior, Ballard told him she would not give him the phone.

“Then he starts grabbing me,” Ballard said. “He reached around and he had one hand on my stomach and one hand on my butt.”

Ballard said she pulled away and immediately told Long he was off the team. But two men who also coached the track team and an assistant principal pleaded with her that Long should not be disciplined, she said. Long brought her flowers, which she called “weird,” telling the 18-year-old he was still not welcome back on the team.

But on the day of the league track and field finals, Ballard recalled that coaches and an administrator and Long all approached her together and insisted he be allowed to run in the meet. The student had made an isolated mistake and should be given another chance, they told her. An administrator told her that because she was young and attractive it was not surprising that Long did not respect her authority, Ballard recalled.

“I was pressured and guilted and I gave in,” Ballard said.

Requests by NBC News for comment from the school and from one of Ballard’s fellow track coaches were not immediately answered.

She said she later considered suing the school district for condoning the assault, with no ramifications for Long. But her mother, a long-time art teacher at Newbury Park High, persuaded her daughter that her chances of joining the school’s full-time faculty would be crushed if she pressed her case.

When she saw the news Thursday that her former student had shot more a dozen innocents at the Borderline bar, she said she was queasy.

“I felt guilty the whole day,” Ballard said. “I felt like I could have prevented this and it never would have happened.”

Later, after talking to a cousin, she said she came to realize it was not so clear what would have happened if the school had disciplined Long a decade ago. Maybe the attack would have come earlier. Maybe the victims would have been Newbury Park students. She does not know.

But Ballard, an ice sculptor who founded an all-female ice-carving group named the Chainsaw Chicks, said she is certain of one thing. “There should be training, and it should be district policy to believe teachers and coaches when they make a real complaint. Besides parents, coaches and teachers are often the first people to see the red flags.”