US President Donald Trump has called the mass shooting at a Texas church that left at least 26 people dead a "mental health problem," and not "a guns situation".

Key points: Trump says church attack "isn't a guns situation" calls gunman "very deranged individual"

Trump says church attack "isn't a guns situation" calls gunman "very deranged individual" Gunman Devin Kelley apparently shot himself after the attack

Gunman Devin Kelley apparently shot himself after the attack Investigators yet to establish shooter's motive

The US President's comments in Japan came as authorities released new details about the deadly rampage carried out by shooter Devin Kelley.

Kelley, 26, walked into the white-steepled First Baptist Church in rural Sutherland Springs on Sunday carrying a Ruger AR-556 assault rifle and wearing a black bulletproof vest, then opened fire during prayer service.

Kelley had reportedly sent threatening text messages to his in-laws who sometimes attended the church, officials said overnight.

Devin Kelley killed 26 people inside the small church. ( AP: Texas Department of Public Safety )

"There was a domestic situation going on within the family and the in-laws," Freeman Martin, a spokesman for the Texas Department of Public Safety, told reporters.

"The mother-in-law attended the church. We know he sent threatening … that she had received threatening text messages from him," he said.

Asked at a press conference what policies he might support in response to the attack, Mr Trump said based on preliminary reports that the gunman was "a very deranged individual, [with] a lot of problems".

[The church attack] isn't a guns situation … [it's] a mental health problem at the highest level. It's a very, very sad event.

"Fortunately someone had a gun shooting in the opposite direction, otherwise it wouldn't have been as bad as it was — it would have been worse."

Authorities revised the age range of the victims overnight, saying the youngest to die was just 18 months old and the oldest was 77.

Officials warned that 10 of the 20 people injured in the attack were fighting for life.

Gunman called dad during chase

Kelley had fired the assault rifle as he walked down the centre aisle then turned around and continued shooting on his way out of the building.

As he left the church, the Air Force veteran was confronted by a man identified by media as Stephen Willeford, who was armed with an assault rifle and shot and wounded Kelley, authorities said.

As Kelley fled in a Ford Expedition, Mr Willeford waved down passing motorist Johnnie Langendorff 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," Mr Martin said.

Mr Langendorff said he had pulled up at the intersection opposite the church when he saw Kelley outside the building exchanging fire with the other man.

Sorry, this video has expired Witness describes chasing church shooter Devin Kelley

"The shooter [Kelley] … [took] off and fled in his vehicle and the other gentleman came and said, 'We need to pursue him — he just shot up the church'," he said.

"So that's what I did."

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.

An autopsy will determine if he died from the self-inflicted wound or after being shot in the gunfight, officials said.

Kelley bought two firearms from stores operated by a sporting goods chain Academy Sports & Outdoors in 2016 and 2017 after being approved in background checks, according to the company.

"Both sales were approved by the National Instant Criminal Background Check System (NICS). We are cooperating with law enforcement as they investigate further," Academy Sports said in a statement.

'We have no motive'

Sorry, this video has expired Emergency services converged on the church after the shooting.

Wilson County Sheriff Joe Tackitt said in an interview that Kelley's in-laws had not been present at the time of the attack.

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

Time is ticking on gun reform Donald Trump said the US would talk about gun laws "as time goes on". But Google search data shows that public attention moves on quickly. Read more Read more

"We don't think he had any connection to this church. We have no motive."

The gunman served in the US Air Force but was reportedly court-martialled in 2012 on charges of assaulting his wife and child, and sentenced to 12 months' confinement.

He received a "bad conduct" discharge in 2014, according to Ann Stefanek, the chief of Air Force media operations.

The attack came a little more than a month after a gunman killed 58 people in Las Vegas in the deadliest shooting by a sole gunman in US history.

'Act of Evil': Trump

Sorry, this video has expired Grief and shock in Sutherland Springs

The shootings again stirred a years-long national debate over easy access to firearms.

In rural areas like Sutherland Springs, gun ownership is a part of life and the state's Republican leaders for years have balked at pushes for gun control, arguing more firearms among responsible owners make the state safer.

To honour the victims, Mr Trump ordered flags on all federal buildings be flown at half mast.

"This act of evil occurred as the victims and their families were in their place of sacred worship," Mr Trump said.

"Through the tears and through the sadness we stand strong, oh so strong."

The First Baptist Church is one of two houses of worship in Sutherland Springs.

The white-painted, one-storey structure features a small steeple and a single front door. On Sunday, the Lone Star flag of Texas was flying alongside the US flag and a third, unidentified banner.

Inside, there is a small raised platform on which members sang worship songs to guitar music and the pastor delivered a weekly sermon, according to videos posted on YouTube.

In one of the clips, a few dozen people, including young children, can be seen sitting in the wooden pews.

It was not clear how many worshippers were inside when the shooting occurred.

Members of the church embrace during a vigil held for the victims of the massacre. ( Reuters: Mohammad Khursheed )

ABC/wires