A connection has emerged between the gunman and a Texas church where 26 people were killed as police described the victims as "defenceless people".
A gunman dressed in black tactical-style gear and armed with an assault rifle opened fire inside the small church before killing people aged between five and 72 in the state's worst ever such atrocity.
Once the shooting started on Sunday at the First Baptist Church in Sutherland Springs, there was probably "no way" for congregants to escape, said Wilson County Sheriff Joe D. Tackitt Jr.
About 20 others were wounded.
"He just walked down the centre aisle, turned around and my understanding was shooting on his way back out," said Mr Tackitt, who said the gunman also carried a handgun but that he did not know if it was fired.
Mr Tackitt described the scene as "terrible."
"It's unbelievable to see children, men and women, laying there. Defenceless people," he said.
Mr Tackitt told CNN the gunman's former in-laws attended services at the church "from time to time" but were not in attendance on Sunday.
The gunman has been identified by officials as Devin Kelley.
The news emerges as Reuters report that the gunman had sent threatening texts to his former mother-in-law.
“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.
Texas church gunman sent threatening texts to in-laws, officials say https://t.co/5WgCspbwhJ— Reuters Top News (@Reuters) November 6, 2017
The gunman crossed the street and started firing the rifle at the church, said Freeman Martin, a regional director of the Texas Department of Safety, then continued firing after entering the white wood-frame building, where an 11am service was scheduled.
As he left, the gunman was confronted by an armed resident who "grabbed his rifle and engaged that suspect", Mr Martin said.
A short time later, the suspect was found dead in his vehicle at the county border.
Federal agents, including ATF investigators and the FBI's evidence collection team, swarmed the small rural community of just hundreds of residents.
Several weapons were found inside the vehicle and Mr Martin said it was unclear if the attacker died of a self-inflicted wound or if he was shot by the resident who confronted him.
Mr Martin said 23 of the dead were found in the church, two were found outside and one died after being taken to a hospital.
The man who confronted Kelley had help from another local resident, Johnnie Langendorff, who told KSAT TV that he was driving past the church as the shooting happened.
Among those killed was the church pastor's 14-year-old daughter, Annabelle Pomeroy.
Pastor Frank Pomeroy and his wife, Sherri, were both out of town when the attack occurred, Sherri Pomeroy wrote in a text message.
"We lost our 14-year-old daughter today and many friends," she wrote.
"Neither of us has made it back into town yet to personally see the devastation.
"I am at the Charlotte airport trying to get home as soon as I can."
Church member Nick Uhlig, 34, who was not at Sunday's service, said his cousin, who was eight months pregnant, and her in-laws were among those killed.
He later told the Houston Chronicle three of his cousin's children also were killed.
President Donald Trump, who was in Japan, called the shooting an "act of evil", later calling the gunman "a very deranged individual".
Two sheriff's vans were parked outside the gate of a cattle fence surrounding the address listed for Kelley on the rural, western outskirts of New Braunfels, north of San Antonio.
Ryan Albers, 16, who lives across the road, said he heard intensifying gunfire coming from that direction in recent days.
"It was definitely not just a shotgun or someone hunting," Ryan said.
"It was someone using automatic weapon fire."
The church has posted videos of its Sunday services on a YouTube channel, raising the possibility that the shooting was captured on video.
Texas governor Greg Abbott said the attack was the worst mass shooting in Texas history.
It came on the eighth anniversary of a shooting at Texas' Fort Hood, where 13 people were killed and 31 others wounded by a former US Army major.
The previous deadliest mass shooting in Texas had been a 1991 attack in Killeen, when a mentally disturbed man crashed his pickup vehicle through a restaurant window at lunchtime and started shooting people, killing 23 and injuring more than 20 others.
The University of Texas was the site of one of the most infamous mass shootings in modern American history, when US Marine sniper Charles Whitman climbed the Austin campus' clock tower in 1966 and began firing on stunned people below, killing 13 and wounding nearly three dozen others.
He had killed his wife and mother before heading to the tower, one victim died a week later and medical examiners eventually attributed a 17th death to Whitman in 2001.
Update 2.12pm: Texas shooter had been discharged from Air Force over alleged domestic violence
The man identified as the gunman in a mass shooting at a Texas church was discharged from the Air Force for allegedly assaulting his spouse and child, according to an Air Force spokeswoman.
The spokeswoman, Ann Stefanek, said Devin Kelley served 12 months' confinement after a 2012 court-martial.
He ultimately received a bad conduct discharge and reduction in rank.
Neighbours of the gunman said they had heard gunfire in days leading up to the atrocity.
Ms Stefanek said Kelley served in Logistics Readiness at Holloman Air Force Base in New Mexico from 2010 until his discharge in 2014.
His job was responsible for moving passengers, cargo and personal property in military transportation.
Authorities did not announce his name at a news conference on the shooting, saying only that the suspect was a white male in his 20s.But a US official and a law enforcement official identified Kelley as the person who opened fire on Sunday at the First Baptist Church of Sutherland Springs, Texas, killing 26 people and wounding about 20 others.
Kelley is reported to have lived in a San Antonio suburb and does not appear to be linked to an organised terrorist groups.
The official said investigators are looking at social media posts Kelley may have made in the days before Sunday's attack, including one that appeared to show an AR-15 style semi-automatic weapon.
An address listed in online records as belonging to Kelley is located in New Braunfels, Texas, just outside San Antonio and about 35 miles from Sutherland Springs.
At the address listed for Kelley in New Braunfels, two sheriff's vans were parked outside and police officers stood at the gate of a cattle fence surrounding the property.
Neighbours said that they heard intense gunfire coming from the direction of the address listed for Kelley in recent days.
"It's really loud. At first I thought someone was blasting," said Ryan Albers, 16, who lives across the road.
"It had to be coming from somewhere pretty close.
"It was definitely not just a shotgun or someone hunting.
"It was someone using automatic weapon fire."
A person matching Kelley's name and date of birth also registered in 2014 to vote in Colorado, with an address listed in Colorado Springs, home of the US Air Force Academy.
The Colorado Secretary of State's office lists his registration now as inactive.
According to Texas Department of Public Safety regional director Freeman Martin, the gunman arrived at a Valero petrol station near the First Baptist Church of Sutherland Springs at around 11.20am on Sunday.
He was dressed in black, wearing tactical gear and a ballistic vest.
He crossed the street to the church, left his vehicle and started firing a Ruger AR assault-type rifle at the church.
Then he entered the church and fired.
The suspect was found dead in his vehicle near the border between Wilson and Guadalupe counties.
Update 12.15pm: Men who gave chase to Texas shooter hailed as heroes
Two men are being hailed as heroes for pursuing the gunman suspected of killing at least 26 people at a Texas church.
Johnnie Langendorff told local media that he chased Devin Kelley after witnessing him exchange fire with an armed neighbour.
He said the pair then helped authorities track him down.
"He just hurt so many people .. why wouldn't you want to take him down. I was on the phone with dispatch the entire time and gave them the direction he was going."
Update - 9.55am: Sheriff reveals no way for church congregation to escape once the shooting started.
Wilson County Sheriff Joe D Tackitt Jr, whose territory includes Sutherland Springs, said there was probably "no way" for the church congregation to escape once the shooting started.
"He just walked down the centre aisle, turned around and my understanding was shooting on his way back out," said Mr Tackitt.
He said the gunman also carried a handgun but that he did not know if it was fired.
The sheriff described the scene as "terrible" and said: "It's unbelievable to see children, men and women, laying there. Defenceless people."
The victims included multiple family members and tight-knit neighbours ranging in age from five to 72 years old.
Update - 8.25am: Donald Trump has said the mass shooting at a Texas church "isn't a guns situation"
Donald Trump has said the mass shooting at a Texas church "isn't a guns situation," but is a "mental health problem at the highest level".
The president spoke after a man killed 26 people and wounded at least 16 others in what the governor called the deadliest mass shooting in the state's history.
Devin Kelley, the man authorities have identified as the gunman, was discharged from the Air Force several years ago for allegedly assaulting his spouse and a child.
Air Force spokeswoman Ann Stefanek said that Kelley served 12 months' confinement after a 2012 court-martial. He ultimately received a bad conduct discharge and reduction in rank.
She said Kelley served in Logistics Readiness at Holloman Air Force Base in New Mexico from 2010 until his discharge in 2014. He was responsible for moving passengers, cargo and personal property in military transportation.
As Kelley left the scene, authorities said he was confronted by an armed resident who engaged the suspect, who later was found dead in his vehicle.
While no officials have publicly questioned Kelley's mental health, Mr Trump said that "is your problem here" when asked about the shooting as he and Japanese Prime Minister Shinzo Abe held a joint news conference in Tokyo.
"This was a very, based on preliminary reports, a very deranged individual. A lot of problems over a long period of time," Mr Trump said.
"We have a lot of mental health problems in our country, as do other countries. But this isn't a guns situation," the president said.
Mr Trump first tweeted that he was monitoring the situation from Japan.
He later described the shooting as an "act of evil" during remarks to a gathering of American and Japanese business executives.
Mr Trump said "fortunately somebody else had a gun that was shooting in the opposite direction otherwise it (wouldn't) have been as bad as it was, it would have been much worse."
"But this is a mental health problem at the highest level. It's a very, very sad event."
Earlier: A man opened fire inside a church in a small South Texas community yesterday, killing 26 people
A man opened fire inside a church in a small South Texas community yesterday, killing 26 people and wounding about 20 others in what the governor called the deadliest mass shooting in the state's history.
Officials did not identify the attacker during a news conference last night, but two other officials - one a US official and one in law enforcement - who were briefed on the investigation identified him as Devin Kelley.
The US official said Kelley lived in a San Antonio suburb and does not appear to be linked to organised terrorist groups. The official said investigators are looking at social media posts Kelley may have made in the days before yesterday's attack, including one that appeared to show an AR-15 semiautomatic weapon.
At the news conference, Freeman Martin, the regional director of the Texas Department of Public Safety, said the attacker was dressed all in black, wearing tactical gear and a ballistic vest, when he arrived at a gas station across from the First Baptist Church at around 11.20am local time.
He crossed the street and started firing a Ruger AR rifle at the church, and continued after entering the building. As he left, he was confronted by an armed resident who chased him. A short time later, the suspect was found dead in his vehicle at the county line, Mr Martin said.
The exact circumstances of his death are unclear. There were several weapons inside the vehicle.
Mr Martin said investigators were not ready to discuss a possible motive for the attack. He said the dead ranged in age from five to 72 years old. Twenty-three were found dead in the church, two were found outside and one died after being taken to a hospital.
Federal law enforcement swarmed the small community 30 miles south-east of San Antonio after the attack to offer assistance, including ATF investigators and members of the FBI's evidence collection team.
Among those killed was the 14-year-old daughter of the church's pastor, Frank Pomeroy, and his wife, Sherri. Sherri Pomeroy wrote in a text message to the AP that she and her husband were out of town in two different states when the attack occurred.
"We lost our 14 year old daughter today and many friends," she wrote. "Neither of us have made it back into town yet to personally see the devastation. I am at the charlotte airport trying to get home as soon as i can."
The wounded were taken to hospitals. Video on KSAT television showed first responders taking a stretcher from the church to a waiting AirLife helicopter. Eight victims were taken by medical helicopter to the Brooke Army Medical Center, the military hospital said.
Megan Posey, a spokeswoman for Connally Memorial Medical Centre, which is in Floresville and about 10 miles from the church, said "multiple" victims were being treated for gunshot wounds.
Alena Berlanga, a Floresville resident who was monitoring the chaos on a police scanner and in Facebook community groups, said everyone knows everyone else in the sparsely populated county. Sutherland Springs has only a few hundred residents.
"This is horrific for our tiny little tight-knit town," said Alena Berlanga. "Everybody's going to be affected and everybody knows someone who's affected," she said.
May God be w/ the people of Sutherland Springs, Texas. The FBI & law enforcement are on the scene. I am monitoring the situation from Japan.— Donald J. Trump (@realDonaldTrump) November 5, 2017
President Donald Trump tweeted from Japan, where is his on an Asian trip, that he was monitoring the situation. Texas Governor Greg Abbott called the shooting an "evil act."