The gunman in the worst mass killing in Texas history escaped from a mental health institution in New Mexico, threatened his Air Force chain of command while facing military charges of domestic violence, and “had already been caught sneaking firearms onto” an air base, according to a 2012 El Paso Police Department report obtained by WFAA.

El Paso police arrested Devin Kelley on June 7, 2012, at a Greyhound bus station a stone’s throw from the U.S.-Mexico border after he escaped the Peak Behavioral Health Services facility about 12 miles away in Santa Teresa, New Mexico, according to the police report.

At the time, Kelley was facing a court martial on charges that he beat his wife and her son at Holloman Air Force Base in New Mexico about 100 miles north of El Paso. It’s unclear when Kelley was confined to the mental health facility, which is near Sunland Park, New Mexico.

Sunland Park police officers, who were looking for Kelley after his escape, told El Paso police officers that Kelley “suffered from mental disorders and had plans to run” from the mental hospital and “take a bus out of state,” according to the El Paso police report.

Sunland Park officers told their Texas colleagues that Kelley “was a danger to himself and others as he had already been caught sneaking firearms” onto Holloman Air Force Base and that Kelley “was attempting to carry out death threats that [he] had made on his military chain of command,” the report states.

When he was arrested, Kelley did not resist “or make any comments about harming himself” or others, according to the report. El Paso officers released Kelley to Sunland Park police, who presumably returned him to the mental facility.

When contacted by WFAA, neither Sunland Park police nor the Dona Ana County Sheriff Department officials said they had any arrest report or book-in photo for Kelley.

Kelley killed 26 people at a Baptist church outside San Antonio Sunday morning. He was kicked out of the Air Force in 2014 after spending a year in a military jail for beating his wife and her son.

On Monday, the Air Force admitted that they had not informed the FBI of his domestic violence conviction, which should have barred him from buying or possessing firearms.

Kelley bought at least four guns between 2014 and 2017, authorities said, including two at San Antonio sporting goods stores.