Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The gunman accused of the worst mass murder in Texas history escaped from a mental health hospital during his stint in the Air Force — after making death threats against his superiors, according to a 2012 police report.

The incident raises new questions about whether Devin Kelley's past should have prompted authorities to make sure that he could not purchase weapons long before he killed 26 people at the First Baptist Church in Sutherland Springs on Sunday.

Police took Kelley into custody on June 7, 2012, at a bus terminal in downtown El Paso, Texas, after he broke out of Peak Behavioral Health Services, just over 10 miles away in New Mexico, according to the report, which was first obtained by NBC Houston affiliate KPRC.

Kelley, who was 21 at the time of the escape, had been sent to the facility after he was accused of assaulting his wife and fracturing his baby stepson's skull.

The person who reported Kelley missing told El Paso officers that Kelley "was a danger to himself and others as he had already been caught sneaking firearms onto Holloman Air Force Base," where he had been stationed, according to the police report.

He "was attempting to carry out death threats" he had made against his military superiors, the report said.

Xavier Alvarez, a former Peak Behavioral employee, confirmed to NBC News that during Kelley's time at the facility he "verbalized that he wanted to get some kind of retribution to his chain of command."

He said other patients had reported that Kelley seemed to be do something suspicious on computers they were allowed to use for things like paying bills. When the military examined the computers, it turned out that Kelley was "ordering weapons and tactical gear and magazines to a P.O. Box in San Antonio," Alvarez said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Alvarez said he had a strong relationship with all the service members in the military wing at Peak Behavioral — but Kelley was an exception. "This kid — he was hollow," Alvarez said. "I could never reach him."

Peak Behavioral declined to comment on the incident citing patient confidentiality. Alvarez said he could not discuss Kelley's diagnosis or any of his medical care.

"This kid — he was hollow. I could never reach him."

But he vividly remembered getting the call that Kelley had "jumped a fence" in the middle of the night and was on the loose. He hopped into his truck and began driving through the desert while staff at the facility questioned other patients about Kelley's intentions.

"It turned out that several times he had mentioned he was practicing for a 12-mile run," Alvarez said. "So I asked Siri, 'What is the distance to the Greyhound station?' And lo and behold, it was 12 miles."

Alvarez, joined by police, said he spotted Kelly getting out of a cab at the bus station, where he "quickly restrained him."

"He put up no fight," Alvarez said of Kelley. "He laid on the ground and police were there in seconds. ... He was very quiet, but he did mention that, given the opportunity, he would try to go for the [officers'] guns."

Kelley was taken back to the facility but eventually discharged for his court-martial.

The Air Force reported that after Kelley was convicted of assault, he was confined for a year, given a bad conduct discharge and reduced in rank to E-1, or airman basic.

Related: Senators Call for Probe After Military Error Let Texas Gunman Buy Weapons

The military failed to enter the domestic violence case into a database that would have made it illegal for him to buy the Luger AR-556 rifle he used to commit the massacre — a mistake that is now under investigation by the Air Force.

The entrance to the First Baptist Church of Sutherland Springs, the site of the shooting, is seen in Sutherland Springs, Texas on Nov. 7, 2017. Jonathan Bachman / Reuters

And in Comal County, Texas, the local sheriff is investigating another apparently missed opportunity to take action against Kelley.

After being discharged from the military, Kelley returned to his hometown of New Braunfels. That's where, in June 2013, deputies received a report of sexual assault against Kelley.

Sheriff Mark Reynolds, who was not the sheriff at the time, said the case file shows that detectives were working on the case in July, September and October "and then it just kind of stalled out."

Police believed Kelley had moved to Colorado, but made no apparent attempt to contact or arrest him there, Reynolds said.

Four months later, they were called to Kelley's New Braunfels home after receiving a report of abuse, Reynolds said. A woman inside the home had texted a friend that she was being abused, and the friend called police.

Reynolds would not identify the woman in the home, but a source familiar with the incident said it was Kelley's girlfriend, and future second wife, Danielle Shields. She told deputies she had sent the texts but denied being abused, and after interviewing Kelley, police chalked it up to a "misunderstanding," the sheriff said.

"Why didn't someone put two and two together?" Reynolds said. "That's what my office is trying to investigate."