The US Air Force has said that, according to initial accounts, it failed to provide information as required about a Texas shooter's criminal history to a key US law enforcement database known as the National Criminal Information Center.

Devin Kelley, a former airman, was convicted in 2012 by a general court-martial on two charges of domestic assault agains this wife and step-son under Article 128 of the Uniform Code of Military Justice.

That information was not entered into the NCIC, the Air Force said.

It is illegal under federal law to sell or give a gun to someone who been convicted of a crime involving domestic violence against a spouse or child.

"The Air Force has launched a review of how the service handled the criminal records of former Airman Devin P Kelley following his 2012 domestic violence conviction," Air Force spokeswoman Ann Stefanek said.

Kelly sent threatening messages to his mother-in-law who sometimes attended the rural Texas church where he fatally shot 26 people, officials have said.

Gunman Devin Patrick Kelley injured another 20 people when he opened fire in the First Baptist Church in Sutherland Springs yesterday.

The attack ranks among the five deadliest mass shootings carried out by a single gunman in US history.

As he left the church, Kelley, 26, was confronted by an local resident who shot and wounded him, authorities said.

Kelley fled and the resident waved down a passing motorist and they chased the suspect at high speeds.

"This good Samaritan, our Texas hero, flagged down a young man from Seguin, Texas, and they jumped in their vehicle and pursued the suspect," Freeman Martin, a spokesman for the Texas Department of Public Safety, said.

Kelley called his father during the chase to say he had been shot and might not survive, officials said.

He later crashed his vehicle, shot himself and died, they added. It was not clear if he died of the self-inflicted wound or those sustained in the gunfight, officials said.

Kelley was involved in a domestic dispute with the family of Danielle Shields, a woman he married in 2014, and the situation had flared up, according to officials and official records.

"There was a domestic situation going on within the family and the in-laws," Mr Martin told reporters outside the church.

"The mother-in-law attended the church ... she had received threatening text messages from him."

Wilson County Sheriff Joe Tackitt said the family members were not in the church during Kelley's attack.

"I heard that (the in-laws) attended church from time to time," Mr Tackitt said. "Not on a regular basis."

Kelley at times had attended services at the church, US Senator Ted Cruz of Texas told reporters at the scene.

"My understanding is that this depraved madman had worshipped at this church before," Mr Cruz said.

The attack came about a month after a gunman killed 58 people in Las Vegas in the deadliest shooting by a lone assailant in modern US history.

The dead ranged in age from 18 months to 77 years.

Ten of the wounded in Texas remained in critical condition this morning, officials said.

Read more
Small town America rocked by latest shooting
Texas church shooting: What we know
26 people killed in Texas church shooting

Wearing a black bullet-proof vest and skull mask, Kelley used a Ruger AR-556 semi-automatic rifle in the attack, authorities said.

They recovered two other weapons, both handguns, from his vehicle.

Republican Texas Governor Greg Abbott told CBS News there was evidence that Kelley had mental health problems and had been denied a state gun permit.

"It's clear this is a person who had violent tendencies, who had some challenges," Mr Abbott said.

A sporting goods chain said Kelley passed background checks when he bought a firearm in 2016 and a second gun in 2017.

Mr Abbott and other Republican politicians said the mass shooting did not influence their support of gun ownership by US citizens - the right to bear arms protected under the Second Amendment of the U.S. Constitution.

"This isn't a guns situation. I mean we could go into it but it's a little bit soon," US President Donald Trump told reporters while on a trip to Asia.

"Fortunately somebody else had a gun that was shooting in the opposite direction, otherwise... it would have been much worse."

Democrats renewed their call to restrict gun ownership.

"How many more people must die at churches or concerts or schools before we stop letting the @NRA control this country's gun policies," Democratic US Senator Elizabeth Warren said on Twitter.

Vice President Mike Pence said on Twitter that he will travel to Sutherland Springs on Wednesday to meet with victims' families and law enforcement.

Kelley was court-martialed in 2012 on charges of assaulting his wife and child, and given a bad-conduct discharge, confinement for 12 months and a reduction in rank, Air Force spokeswoman Ann Stefanek said.

He was discharged in 2014.