SUTHERLAND SPRINGS, Tex. — A gunman clad in all black, with a ballistic vest strapped to his chest and a military-style rifle in his hands, opened fire on parishioners at a Sunday service at a small Baptist church in rural Texas, killing at least 26 people and turning this tiny town east of San Antonio into the scene of the country’s newest mass horror.
The gunman was identified as Devin Patrick Kelley, 26, according to two law enforcement officials who spoke on the condition of anonymity because the investigation was continuing. Mr. Kelley, who lived in New Braunfels, Tex., died shortly after the attack.
He had served in the Air Force at a base in New Mexico but was court-martialed in 2012 on charges of assaulting his wife and child. He was sentenced to 12 months’ confinement and received a “bad conduct” discharge in 2014, according to Ann Stefanek, the chief of Air Force media operations.
The motive for the attack was unclear on Sunday, but the grisly nature of it could not have been clearer: Families gathered in pews, clutching Bibles and praying to the Lord, were murdered in cold blood on the spot.
Mr. Kelley started firing at the First Baptist Church in Sutherland Springs not long after the Sunday morning service began at 11 a.m., officials said. He was armed with a Ruger military-style rifle, and within minutes, many of those inside the small church were either dead or wounded. The victims ranged in age from 5 to 72, and among the dead were several children, a pregnant woman and the pastor’s 14-year-old daughter. It was the deadliest mass shooting in the state’s history. At least 20 more were wounded.
“It’s something we all say does not happen in small communities, although we found out today it does,” said Joe Tackitt, the sheriff of Wilson County, which includes Sutherland Springs.
Sheriff Tackitt and other officials said the gunman first stopped at a gas station across Highway 87 from the church. He drove across the street, got out of his car and began firing from the outside, moving to the right side of the church, the authorities said. Then he entered the building and kept firing.
The authorities received their first call about a gunman at about 11:20 a.m. Officials and witnesses said Mr. Kelley appeared to be prepared for an assault, with black tactical gear, multiple rounds of ammunition and a ballistic vest.
“He went there, he walked in, started shooting people and then took off,” said Representative Henry Cuellar, a Texas congressman who represents the region and who was briefed by law enforcement officials.
When Mr. Kelley emerged from the church, an armed neighbor exchanged gunfire with him, hitting Mr. Kelley, who fled in his vehicle. Neighbors apparently followed him, chasing him into the next county, Guadalupe County, where Mr. Kelley crashed his car. Mr. Kelley was found dead in his vehicle. Officials said it was unclear how Mr. Kelley had died.
At the church, he left behind a scene of carnage. Of the 26 fatalities, 23 people were found dead inside the church, two were found outside, and one died later at a hospital.
Speaking at a news conference in Japan, the first stop on his tour of Asia, President Trump called the shooting a “mental health problem at the highest level” and not “a guns situation,” adding the gunman was a “very deranged individual.” He also ordered flags flown at half-staff at the White House and all federal buildings through Thursday.
In Floresville, Tex., hours after the attack, Scott Holcombe, 30, sat with his sister on the curb outside the emergency room at Connally Memorial Medical Center. They were both in tears. Their father, Bryan Holcombe, had been guest preaching at the church, they said, and he and their mother, Karla Holcombe, were killed.
“I’m dumbfounded,” Mr. Holcombe said, also noting that his pregnant sister-in-law, Crystal Holcombe, had been killed. “This is unimaginable. My father was a good man, and he loved to preach. He had a good heart.”
His sister, Sarah Slavin, 33, added: “They weren’t afraid of death. They had a strong faith, so there’s comfort in that. I feel like my parents, especially my mom, wasn’t scared.”
A parishioner, Sandy Ward, said that a daughter-in-law and three of her grandchildren were shot. Her grandson, who is 5, was shot four times and remained in surgery Sunday night. She said she was awaiting word on her other family members.
Ms. Ward said she did not attend services on Sunday because of her troubled knees and a bad hip. “I just started praying for everybody who was there” when she learned of the shooting, she said.
At a news conference on Sunday, Gov. Greg Abbott said that he and other Texans were asking “for God’s comfort, for God’s guidance and for God’s healing for all those who are suffering.”
In a time of crisis, he said, “Americans will do what we do best: we pull together and join hands and lock arms and through the tears and sadness we stand strong.”
The Federal Bureau of Investigation and the Bureau of Alcohol, Tobacco, Firearms and Explosives were helping in the investigation, which was being led by the Texas Rangers.
The shooting unfolded on the eighth anniversary of the attack in 2009 on Fort Hood in Texas, when an Army psychiatrist, Maj. Nidal Malik Hasan, killed 13 people in one of the deadliest mass shootings at an American military base. Major Hasan carried out his attack in an attempt to wage jihad on American military personnel.
The death toll on Sunday also exceeded the number killed in 1966 by a student at the University of Texas at Austin, Charles Whitman, who opened fire from the school’s clock tower in a day of violence that ultimately killed 17. It also exceeded the number killed during a rampage at a restaurant in Killeen in 1991 in which a gunman fatally shot 23 people and then took his own life.
And the shooting on Sunday occurred more than two years after Dylann S. Roof opened fire at Emanuel African Methodist Episcopal Church in Charleston, S.C., in June 2015, killing nine people, including the pastor. The motive in that attack was racial hatred — Mr. Roof, a white supremacist, plotted an assault on a black congregation — but no motive has been established by the authorities in the shooting in Sutherland Springs. The First Baptist Church is predominantly white, and Mr. Kelley is white.