El Paso officers who detained Devin Kelley five years ago were told he was "a danger to himself and others".
Kelley had been sent to the hospital after he was court-martialled for assaulting his ex-wife and stepson during a stint in the US Air Force.
He was "attempting to carry out death threats" against "his military chain of command", the report states.
Officials say the assault charge should have legally barred him from owning guns.
The person who reported him missing from the facility told police Kelley "suffered from mental disorders".
Kelley "had already been caught sneaking firearms onto Holloman Air Force Base", the report adds.
Later that year, Kelley pleaded guilty in a military court to repeatedly assaulting his wife and toddler stepson.
He was sentenced to one year in a US Navy prison.
FBI investigators said on Tuesday they have been trying to unlock Kelley's mobile phone, to better understand what led him to carry out the mass shooting.
According to the Houston Chronicle newspaper, the 26-year-old killer had shown up at the First Baptist Church of Sutherland Springs with his children for an annual fall festival five days before the shooting.
A friend of Kelley's former mother-in-law Michelle Shields, who officials believe he was targeting on Sunday, said she was glad to see him at last week's event with her grandchildren following past family troubles.
Photos of the event on the church's Facebook page show children dressed in Halloween costumes and playing games.


No comments: