(NBC NEWS) — He arrived at church ready for war, wearing black tactical gear and a ballistics vest and toting what authorities described as an "assault-type rifle."
Then Devin Patrick Kelley, 26, opened fire on a small Texas church on Sunday morning, killing 26 people, wounding at least 10 others and providing the two-gas station community of Sutherland Springs with a grim distinction, authorities said.
"We are dealing with the largest mass shooting in our state's history," Gov. Greg Abbott said at a news conference.
What was behind this act of carnage in a place of sanctuary?
Ann Stefanek, a spokeswoman for the Air Force, confirmed that Kelley was court-martialed in 2012 on two charges of assaulting his spouse and their child. He was confined for a year, given a bad conduct discharge and reduced in rank to E-1, or airman basic, Stefanek said.
Records show Kelley's first marriage ended in divorce in 2012. He remarried in 2014; the status of that relationship was unclear.
Two ex-girlfriends told NBC News Kelley's behavior became disturbing — even violent — after they broke up with him.
"Years after dating me he would try to bribe me to hang out with him," former girlfriend Katy Landry told NBC News in a Facebook message. "He ended up assaulting me. He would stalk me by repeatedly calling me — even prank calling me saying really weird stuff.
"That was another thing about him — he was very sick in the head...He would tell me very sick strange things," she said, without providing details.
Brittany Adcock, 22, said she dated Kelley for two months when she was 13 and he was 18.
"At the time I didn’t think much into it being so young but now I realize that there’s something off about someone who is 18 with someone who is 13," she said.
When she broke it off, he continued to harass her, she said.
"He somehow would always find out my number although none of my friends talked to him and he would constantly call me until I blocked his number," she said. "Then I’d get calls from an unknown number so I’ve had to change my number quite a bit.
"He would offer me money to hang out with him quite a bit. There has been one point that I called the police because he was just calling me so much I wanted to report harassment," Adcock said, adding that she tried to make a police report about the situation.
"One time he told me I should move in with him and his wife and that he would take care of me as long as I walked around topless. Not long after, his wife messaged me and asked why I’m talking to her husband and I told her what he was saying and sent her screenshots and she then apologized and then I was blocked from speaking to her."
A search of criminal records in Comal County, where Kelley lived, yielded only minor violations — driving with an expired registration, speeding, failure to stop at a stop sign, driving without insurance.
A New Braunfels Independent School District spokeswoman confirmed that Kelley graduated from New Braunfels High School in 2009, but declined to offer additional details about him.
"This senseless act of violence is something that is hard to understand and has definitely shaken our community," the spokeswoman, Rebecca M. Villarreal, said in a statement.
Dave Ivey, Kelley's uncle, said in a Facebook message that he "never in a million years could of believed Devin could be capable of this kind of thing."
"I am numb," Ivey said. "My family will suffer because of his coward actions. ... I am so sorry for the victims in Texas."
Federal officials said they'd found no obvious link to an organized terrorist group. Wilson County Sheriff Joe Tackitt said Kelley's ex-in-laws worship at the church, but weren't in attendance Sunday.
Freeman Martin regional director of the state Department of Public Safety, said authorities were investigating whether Kelley belonged to a militia. But Freeman added: "We can't say one way or another."
Martin told reporters that Kelley was wearing the tactical gear and the ballistics vest when he pulled into a gas station in Sutherland Springs at 11:20 a.m. local time Sunday. He had multiple weapons in his car, Martin said. Martin didn't provide additional details, but he said Texas Ranger bomb specialists were processing the car.
After leaving the gas station, the gunman crossed the street, got out of his car and sprayed First Baptist Church's right side with his rifle, Martin said. He then entered the church and continued to fire until a local resident grabbed Kelley's rifle, forcing him to drop it and flee. The resident pursued Kelley, who drove off the road and crashed, Martin said.
Kelley was later found dead, Martin said, although it was unclear how he died.
"We don't know if it was a self-inflicted gunshot wound or if he was shot by our local resident who engaged him in gunfire," he said.