Texas church shooter Devin Kelley escaped from a psychiatric hospital five years before carrying out the worst mass killing in Texas history, according to a police report released on Tuesday.

The report stated that El Paso police were advised Kelley, then 21, was a danger to himself and others as he had been caught smuggling firearms onto Holloman Air Base in New Mexico and was trying to carry out death threats against military superiors.

Kelley stormed the First Baptist Church in Sutherland Springs, Texas, on Sunday as services were being held, killing 26 people, including an 18-month-old and a pregnant woman, and wounding 20 others. Officials said that before the shooting Kelley sent threatening texts to his mother-in-law who attended the church but wasn’t there Sunday.

The FBI said Tuesday that the phone Kelley used to call his father during a high-speed chase after the rampage has been sent to the FBI Academy in Quantico. "Unfortunately, at this point in time, we are unable to get into that phone," FBI Special Agent in charge Christopher Combs said at a news conference in Sutherland Springs.

Police responded to the downtown bus terminal on June 13, 2012, around 11:30 p.m. to look for Kelley after he had escaped from Peak Behavioral Health Services near El Paso, according to the report first obtained by KPRC-TV.

Kelley had only been in the hospital for a few days before escaping, a Pentagon official told Fox News. Kelley was in pre-trial confinement on his base in New Mexico starting on June 8, when he did something to get him sent to the mental institution. The official could not confirm the reason he was sent off citing privacy law.

After arriving at the terminal, the director of Peak Behavioral informed the officers that Kelley “suffered from mental disorders” and had plans to flee the hospital and take a bus out of state.

Kelley had been sent to the hospital after being charged in a military court with assaulting his wife and baby stepson over a two month period in 2011. The infant suffered a fractured skull in the assault.

Kelley pleaded guilty and was court-martialed in 2012. After serving 12 months of confinement, he was given a bad conduct discharge from the Air Force with a reduction in rank in 2014. He joined the Air Force in 2010.

The police report stated that when Kelley was finally found at the terminal he “did not resist or make any comments about harming himself or other(s) to the officers.”

Kelley was then turned over to officers from the Sunland Park Police Department who took him back to the hospital.

The police report stated that Kelley was wearing a hooded sweatshirt, blue jean shorts and white shoes.

The report also stated that information about the incident was entered into the FBI’s National Crime Information Center database.

Fox News' Lucas Tomlinson contributed to this report.