NEW BRAUNFELS, Texas — The former wife of the man responsible for killing 26 people in a Texas church last week said he had threatened to kill her over the course of their relationship, once putting a gun to her head and asking her whether she wanted to die.

The comments, the first public statements made by gunman Kelley's first wife, Tessa Brennaman, add to the growing portrait of Devin Kelley as an unstable young man whose path through life was marked by disruption, anger, and the potential for violence.

In an interview with Inside Edition published in part on CBS' website, Brennaman, 25, described her former husband as someone with "a lot of demons or hatred inside of him" and said he once threatened her for getting a speeding ticket.

"He had a gun in his holster right here, and he took that gun out and he put it to my temple and he said, 'Do you want to die? Do you want to die?'" she told a television interviewer.

Kelley's treatment of Brennaman, then Tessa Kelley, during their marriage has come into harsh focus in the aftermath of the mass shooting — the worst in Texas history — leaving unanswered questions about how the conviction and prison sentence he was given for domestic abuse against her and her son were not reported to federal authorities.

Brennaman and Kelley divorced after the incident, which resulted in him being court-martialed and sentenced to a year of confinement. The domestic violence charges should have prevented him from being able to buy the guns he used in the shooting, the Air Force said.

Other information about Kelley's turbulent life has emerged in recent days.

Officials in New Braunfels, where Kelley lived with his family, have been unable to explain why his court file is marked with a yellow flag, which denotes psychiatric issues, in their digital records. "We can't figure out who put it in and why," the county's sheriff, Mark Reynolds, said.

Records released by the New Braunfels Independent School District show that Kelley racked up a lengthy disciplinary record in high school, including seven suspensions for falsifying records, insubordination, profanity, and a drug-related offense. He graduated 260th in a class of 393 in 2009, with a 2.32 grade-point average.

His martial arts instructor from those years said Kelley had signed up because he had been bullied as an adolescent. "He had it tough," said the instructor, who spoke on the condition of anonymity, saying he hoped to avoid unwanted attention. "He didn't quite fit in. He was a good athlete, not a great athlete. He was a good student, not a great student. So I think he was struggling to find his place."

The instructor said he had believed that Kelley's karate work — Kelley earned a black belt about midway through high school after about four or five years of training, he said — had helped set the teenager on solid footing.

Unlike other family members who went to Texas A&M University in nearby San Antonio, including his father and two sisters, Kelley joined the Air Force after high school. But his problems seemed only to grow there.

Jessika Edwards, a former Air Force staff sergeant who said she worked with Kelley at Holloman Air Force Base in New Mexico, told CNN that he was constantly getting into trouble.

"It was problem after problem," she said.

His behavior caused her to worry about his potential for violence toward others; Edwards said he displayed a fascination with mass murders.

"He would make jokes about wanting to kill somebody," she said.

Edwards said Kelley had threatened to harm himself before the Air Force referred him for mental-health treatment, according to CNN. He escaped from a mental-health facility near the base in 2012; police dispatched to find him said they were told that he "was a danger to himself and others." A police report said he had been caught sneaking guns onto an Air Force base "attempting to carry out death threats" against military superiors.

After Kelley was given a bad-conduct discharge from the Air Force in 2014 stemming from his domestic violence case, Edwards said, he reached out to her, asking her whether she'd be a reference for him as he applied to jobs. But some discussions they had over social media continued to alarm her, she said. He told her that he bought dogs on Craigslist so he could shoot them, and he expressed admiration for Dylann Roof, who killed nine people at a South Carolina church in 2015, CNN reported.

"He would say, 'Isn't it cool? Did you watch the news?'" Edwards said, according to CNN. "He would say he wished he had the nerve to do it, but all he would be able to do is kill animals."

Kelley was charged in 2014 with a misdemeanor count of animal mistreatment in El Paso County, Colo., where he lived at one point, after neighbors complained that a man matching his description had punched a dog.

Edwards said that though she blocked Kelley on Facebook because of his messages, she didn't think he would act on them.

"In a sane person's mind, when people say something like that, you don't think it's something they're going to do," she said.

She gave him her number and an instruction to call if he felt as if he was going to hurt himself or someone else. He never did. Instead she got a text from a friend after Kelley had been identified as the gunman last Sunday evening. "I dropped a glass and started crying," Edwards said.

Two parishioners of the First Baptist Church also said that Kelley's demeanor at a recent fall festival held by the church had concerned them. Judy and Rod Green told CBS that Kelley had showed up in all black and seemed "completely distant and way out in thought." Rod Green told the outlet that he had tried to determine whether Kelley was armed at the time, saying he would have escorted him from the area if he had been.

A woman who identified herself on Saturday to the Washington Post as Kelley's grandmother said the whole family was devastated.

"I know he lost it," she said. "It's broken all of our hearts. We feel so very sad."

Of Kelley's parents, she said: "They're walking through a living hell right now."

Todd Friesenhahn, justice of the peace for Guadalupe County's Precinct 4, said a complete autopsy report on Kelley's body, which will include toxicology information, might be done "within three weeks."

Eva Ruth Moravec contributed to this report.