SUTHERLAND SPRINGS, Texas (Reuters) - The former U.S. serviceman who committed the deadliest mass shooting on record in Texas escaped from a mental hospital in 2012 as he faced court-martial on domestic violence charges for which he was later convicted, a police report revealed on Tuesday.

The report also disclosed that police who were alerted to Devin Kelley’s escape were advised that he posed a “danger to himself and others” after being “caught sneaking firearms” onto the U.S. Air Force base in New Mexico where he was stationed.

The person who reported the escape, according to the report, further warned that Kelley, then aged 21, had been “attempting to carry out death threats” against his military commanders and “suffered from mental disorders.”

He was apprehended without incident at an El Paso, Texas, bus station shortly after he had run off, according to a police report filed in that city.

Kelley’s troubled Air Force background has been a focus of investigators in the tiny Texas town of Sutherland Springs since he stormed into a church there on Sunday with a semi-automatic assault rifle and opened fire on worshipers.

Authorities have said 26 people were killed in the assault, including the unborn child of a pregnant woman who was among the dead. Another 20 people were wounded, half of them still listed in critical condition as of Tuesday.

Officials said Kelley, 26, killed himself during a failed getaway attempt after he was wounded by an armed civilian who tried to stop him. Two handguns belonging to the killer also were recovered.

A major sporting goods dealer in San Antonio later confirmed that Kelley twice passed a required criminal background check when he bought guns there during the past year, despite having a criminal record that should have prevented those purchases.

Kelley was found guilty by court-martial in 2012 of assaulting his first wife and a stepson while serving at Holloman Air Force Base, where he was assigned to a logistics readiness unit, the Pentagon reported on Monday.

But the Air Force also acknowledged it inexplicably failed to enter his conviction into a government database that all licensed firearms dealers are required to use to screen prospective gun buyers for their criminal history.

Federal law prohibits anyone from selling a gun to someone who has been convicted of a crime involving domestic violence against a spouse or child.

On Capitol Hill, the Republican chairman of the U.S. House Armed Services Committee, Representative Mac Thornberry of Texas, called the failure to transmit Kelley’s record into the National Criminal Information Center (NCIC) system an “appalling” lapse.

The Air Force has opened an inquiry into the matter, and the U.S. Defense Department has requested a review by its inspector general to ensure other criminal cases have been reported correctly, Pentagon officials said.

Two U.S. senators, Republican Jeff Flake of Arizona and Democratic Martin Heinrich of New Mexico, said they planned to co-sponsor legislation aimed at ensuring that anyone convicted of domestic violence, whether in civilian or military court, would be blocked from legally purchasing a gun.

Firearms experts said the case involving Kelley, who spent a year in military detention before his bad-conduct discharge from the Air Force in 2014, exposed a previously unnoticed weak link in the system of background checks.

BEHAVIOR PROBLEMS AS STUDENT

Texas public school records also showed Kelley had numerous behavior problems as a student, including nine suspensions for such issues as drugs, insubordination, profanity, skipping classes and dishonesty between sixth grade and high school graduation.

Slideshow ( 16 images )

His private adult life appears to have likewise been marked by turbulence.

After divorcing the woman he was convicted of assaulting, Kelley remarried in 2014, but authorities have said he became embroiled in some unspecified domestic dispute with her parents that involved him sending threatening text messages to his mother-in-law.

Kelley’s in-laws occasionally attended services at the First Baptist Church in Sutherland Springs but were not there when he attacked worshipers during Sunday prayers, authorities said.

“We have some indication of what the conflict was between the family,” Freeman Martin, spokesman for the Texas Department of Public Safety, told a Tuesday news conference. It was not clear what role, if any, the dispute played as a motivating factor in Sunday’s violence.

Slideshow ( 16 images )

Kelley’s cell phone was sent to the Federal Bureau of Investigation’s crime lab at Quantico, Virginia, but specialists were not immediately able to gain electronic access to the device, said Christopher Combs, the FBI’s special agent in charge in San Antonio.

The massacre, which ranked as the deadliest mass shooting by a single gunman in Texas history, and one of the five most lethal ever in the United States, rekindled an ongoing debate over gun ownership, which is protected by the Second Amendment of the U.S. Constitution. Guns are part of the fabric of life in rural areas.

U.S. President Donald Trump told reporters he believed stricter reviews of gun purchases would not have stopped Sunday’s rampage.

“There would have been no difference,” Trump said during a visit to South Korea. He added that stricter gun laws might have prevented the man who shot Kelley from acting as he did. “You would have had hundreds more dead.”

Graphic - Mass shooting at Texas church:

Graphic - Major shootings in the U.S. :