A lone gunman's gruesome assault on a rural church here that killed 26 people appears to have stemmed from a domestic dispute and is not being investigated as terrorism, authorities said Monday.

The Texas Department of Public Safety on Monday identified the shooter as Devin Kelley, 26, of New Braunfels. DPS official Freeman Martin said Kelley's in-laws had previously attended services at the First Baptist Church but were not there during the deadly rampage on Sunday.

Martin said Kelley had sent threatening text messages to his mother-in-law.

"We can tell you that there was a domestic situation going on within this family," Martin said. "This was not racially motivated; it wasn't over religious beliefs."

Kelley was court-martialed in 2012 for assaulting his spouse and their child, receiving a bad conduct discharge from the Air Force and 12 months of confinement.

Martin said the victims in Sunday's rampage ranged in age from 18 months to 77 years. He said 20 people were wounded in the attack.

Wilson County Sheriff Joe Tackitt said about half the victims were children. All of the bodies had been removed from the First Baptist Church, he said, and all but one of the victims had been identified by investigators.

“It’s just a horrific sight,” Tackitt said. “You don’t expect to walk into a church and see something like that, especially when all the bodies were there, and seeing the children. That’s what hurts the most.”

When asked whether he expects the death toll to rise, the sheriff said he believes most of those hospitalized are in stable condition. He said there are about 20 people still in the hospital.

The church normally posted video of its services online, Tackitt said. But he said there was "very little" video from Sunday's service.

The killer was pursued by two local residents. As law enforcement responded, the suspect drove off a roadway at the Wilson County/Guadalupe County line, state DPS official Freeman Martin said.

A passerby, Johnnie Langendorff, said he was driving past an intersection and saw two men exchanging gunfire. The suspect fled in a vehicle, and Langendorff said the other man, a local resident Langendorff did not name, jumped into his truck and told him what had happened moments earlier at the church.

The duo pursued, calling 911 to let authorities know the location of the gunman. After a short chase, the suspect lost control of the vehicle, Langendorff said. The shooter was found dead in his vehicle, but Martin said it was not immediately certain whether the fatal wound came from a self-inflicted gunshot or from the person pursuing him.

The sheriff said he has spoken with the man who is being credited with confronting the gunman.

“He doesn’t believe he’s a hero, but I believe he is,” Tackitt said, adding that the man doesn’t want to speak to any media.

“If he hadn’t been there, the guy could have possibly gotten away, you know because, I mean no one would have seen what type of vehicle he was driving,” he said. “There’s another church two miles down the road over there. He could have stopped in there too.”

Speaking to reporters late Sunday, Texas Gov. Greg Abbott said, "There are no words to describe the pure evil that we witnessed in Sutherland Springs today."

Officials said 23 of the 26 victims were shot inside the church.

Tackitt said he knew quite a few of the people who were in the church, later describing the community as one where “pretty much everyone knows everyone.” He said recently the church hosted a fall festival.

“A week later this happens,” he said.

He confirmed a family had been killed, though he didn’t confirm number of people in the family, describing it as a “a pretty high number.” Tackitt said he’s known the family “forever.”

Frank Pomeroy, who is pastor at the church, told ABC News he was out of town when the rampage took place, but that his daughter was killed. Annabelle, 14, "was one very beautiful, special child,” Pomeroy said.

Tackitt confirmed that a visiting pastor Sunday was one of the victims.

Dearman reports for the Corpus Christi Caller-Times; Bacon and Toppo report for USA TODAY from McLean, Va.