Authorities did not identify the gunman, saying only that he was a “young white male, maybe in his early 20s,” who was wearing a bulletproof vest and found dead in his vehicle after being confronted by a local resident.
Governor Greg Abbott warned the toll may rise.
“There are 26 lives that have been lost. We don’t know if that number will rise or not, all we know is that’s too many, and this will be a long, suffering mourning for those in pain,” he said.
Exactly five weeks after the worst shooting in modern US history, the latest tragedy prompted an outpouring of condolences, led by US President Donald Trump.
The victims, who ranged in age from five to 72, were gunned down at First Baptist Church in Sutherland Springs, a rural community of about 400 people located 30 miles (50 kilometers) southeast of San Antonio.
The gunman fired outside at the church before entering the building and continuing to spray bullets, said Freeman Martin, regional director of the Texas Department of Public Safety.
“As he exited the church, a local resident grabbed his rifle and engaged that suspect. The suspect dropped his rifle, which was a Ruger AR assault-type rifle, and fled from the church. Our local citizen pursued the suspect at that time,” Martin said.
Law enforcement later found the gunman dead in his car, which had crashed, on the Wilson-Guadalupe county line. It was not clear if he had committed suicide or was shot by the resident who had confronted him.
US media outlets had identified the shooter as a 26-year-old veteran who had faced a court-martial and was dishonorably discharged from the Air Force.
“There’s so many families who have lost family members. Fathers, mothers, sons, and daughters,” Abbott said.
“The tragedy, of course, is worsened by the fact that it occurred in a church, a place of worship, where these people were innocently gunned down. We mourn their loss, but we support their family members.”
The wounded had been transported to various hospitals with “injuries that vary from minor to very severe,” Martin said.
The dead included the 14-year-old daughter of pastor Frank Pomeroy, the church leader told ABC News.
Annabelle Renee Pomeroy “was one very beautiful, special child,” her father said.
Frank Pomeroy had been in the neighboring state of Oklahoma at the time of the shooting, and was driving back to Texas after the tragedy.
Other victims, some of whom were evacuated by helicopter, included a six-year-old boy named Rylan who was in surgery after being shot four times, his uncle told CBS News. A two-year-old was also shot and wounded, The Dallas Morning News reported.
A spokeswoman for Connally Memorial Medical Center in nearby Floresville said the hospital received eight patients with gunshot wounds. Four were transferred to San Antonio.
Trump vows ‘full support’
Police formed a perimeter around the area. Tearful relatives and neighbors stood outside, nervously awaiting news from inside the traditional, white-frame church.
Agents from the FBI and the Bureau of Alcohol, Tobacco, Firearms and Explosives were headed to Sutherland Springs, the agencies said.
President Donald Trump, who is traveling in Asia, denounced the “horrific shooting.”
“This act of evil occurred as the victims and their families were in their place of worship. Our hearts are broken,” he said.
“We pull together, we join hands, we lock arms and through the tears and through the sadness, we stand strong.”
The president promised his administration’s “full support” to the investigation.
US Senator Ted Cruz of Texas said on Twitter: “Keeping all harmed in Sutherland Springs in our prayers and grateful for our brave first responders on the scene.”
The shooting comes just over a month after a gunman in Las Vegas fired down from a hotel room onto an outdoor concert, killing 58 people and wounding hundreds. It was the deadliest mass shooting in modern US history.
And Sunday’s tragedy came just over two years after a white supremacist, Dylann Roof, entered a historically black church in Charleston, South Carolina, and shot nine people to death.