The gunman who killed 26 churchgoers in rural Texas on Sunday had escaped a psychiatric hospital while serving in the Air Force, according to a 2012 police report published Tuesday by Houston NBC affiliate KPRC-TV.

The shooter was hospitalized after making death threats against Air Force superiors and trying to smuggle weapons onto the base where he was stationed. Police took him into custody at a bus station in downtown El Paso, after escaping from a hospital a few miles away in Santa Teresa, NM, where he was sent after being charged in a military court with assaulting his wife and baby stepson.

The person who reported him missing from the hospital advised he “suffered from mental disorders” and “was attempting to carry out death threats” against “his military chain of command.” The report said the man “was a danger to himself and others.”

Later that year, Devin Kelley pleaded guilty in a military court to assaulting his wife and her infant son, fracturing the toddler’s skull. He was sentenced to a year in a military prison. Subsequent to his release, he was able to purchase four guns, including the semi-automatic rifle he used on Sunday to murder 26 people and wound another 20, about half of them children, as they attended a Baptist church in the tiny Texas town of Sutherland Springs. He took his own life as he was being pursued by two local residents after fleeing the church, which was attended by his mother in law, with whom authorities said he had a grudge and to whom he had sent threatening messages.