Law enforcement officials investigate the scene of a shooting at the First Baptist Church of Sutherland Springs, Nov. 6, 2017, in Sutherland Springs, Texas.
Law enforcement officials investigate the scene of a shooting at the First Baptist Church of Sutherland Springs, Nov. 6, 2017, in Sutherland Springs, Texas.

The gunman who killed 26 people at a Texas church appeared to have been motivated by a domestic dispute with his in-laws and had sent "threatening texts" to his mother-in-law before launching the attack, authorities said Monday.

"It’s a senseless crime, but we can tell you that there was a domestic situation going on within this family," Texas Public Safety official Freeman Martin said as investigators searched for the reasons why Devin Kelley opened fired on worshipers at a Baptist church during a Sunday morning service in Sutherland Springs, Texas.

Kelley, 26, had previously been kicked out of the Air Force on a bad conduct discharge.

Martin said Kelley's in-laws attended the First Baptist Church from time to time, although investigators said they were not at the church on Sunday. U.S. news accounts, however, said that one of the shooting victims was a grandmother of Kelley's wife.

"This was not racially motivated ... wasn’t over religious beliefs. There was a domestic situation going on within the family and in-laws,” Martin said.

Texas authorities rejected Kelley's bid to get a license to carry a gun in the state, but Martin said Kelley carried out the attack with a Ruger 556 assault rifle and that two handguns were found in his car. Investigators say they believe Kelley died of a self-inflicted gunshot wound in his car after fleeing the scene of the carnage at the small, white frame church.

Pastor Frank Pomeroy, with his wife Sherri, listen
Pastor Frank Pomeroy, with his wife Sherri, listens at a news conference outside the site of the shooting at his church, the First Baptist Church of Sutherland, Texas, Nov. 6, 2017.

Authorities said Kelley called his father as he sped from the church to say that he had been shot, apparently by a neighbor who heard the mayhem as it unfolded and exchanged gunfire with Kelley, and that he did not think he would survive.

Wilson County Sheriff Joe Tackitt said Kelley, dressed in a skull mask and black tactical gear, fired his assault weapon as he walked down the center aisle at the church and, after turning around, continued firing as he left the building.

"It's unbelievable to see children, men and women, laying there. Defenseless people," Tackitt said.

Authorities said the 26 people killed ranged in age from 18 months to 77 years old, while the 20 wounded in the attack ranged in age from 5 to 73. Martin said that 10 of the wounded worshipers remain in critical condition, four are in serious condition and another six have stabilized or been released from a hospital.

Map of Texas church shooters movements

Texas Governor Greg Abbott told CBS News, "It's clear this is a person who had violent tendencies, who had challenges. Someone who was a powder keg waiting to go off."

According to Pentagon records, Kelley served in the U.S. Air Force from 2010 to 2014, but was court-martialed in 2012 for assaulting his wife and child, sentenced to 12 months' imprisonment and then dishonorably discharged from the military.

Witnesses say he first fired on people outside the church, then inside, where all but two of the victims were killed or wounded.

A neighboring resident heard the mayhem unfold during the sunny morning and then, armed with a rifle, exchanged shots with Kelley. Another man, Johnnie Langendorff, who was driving by the church, also heard the gunfire and then, along with the neighbor with the rifle, pursued Kelley as he fled the scene.

"The gentleman with the rifle came to my truck as the shooter took off, and he briefed me quickly on what had just happened and said that we have to get him," Langendorff told CBS. "We just take pursuit. And like I said, we hit about 95 (miles an hour) trying to catch this guy until he eventually lost control on his own and went off in the ditch.

"He just hurt so many people," Langendorff said. "And he just affected so many people's lives. Why wouldn't you want to take him down?"

Law enforcement officials move flowers left at the
Law enforcement officials move flowers left at the scene of a shooting at the First Baptist Church of Sutherland Springs, Nov. 6, 2017, in Sutherland Springs, Texas.

Authorities said they found Kelley slumped in his car in a field near haystacks.

The deadly mayhem in Texas came 35 days after the worst mass shooting rampage in modern U.S. history, when a man identified as Stephen Paddock opened fire on a country music show in Las Vegas, killing 58 people and wounding about 500. Paddock shot from his 32nd floor hotel room and killed himself as police moved in. Investigators there are still working to determine a motive.

President Donald Trump, traveling in Asia on a five-nation trip, said the Texas shooting "isn't a guns situation" but "a mental health problem at the highest level. It's a very, very sad event." He said the shooter was "a very deranged individual."  

WATCH: Trump on Texas shooting

Earlier, Trump called the shootings "an act of evil" and appealed for prayers. He ordered U.S. flags on federal buildings to be flown at half-staff through Thursday.  

"We cannot put into words, the pain and grief we all feel and we cannot begin to imagine the suffering of those who lost the ones they so dearly loved. Our hearts are broken," the president said.

Investigators from the Federal Bureau of Investigation and the Bureau of Alcohol, Tobacco, Firearms and Explosives have joined local law enforcement officers in Sutherland Springs, about 50 kilometers from San Antonio, to investigate.

Marie Ann Montgomery, the church's Sunday school director, said people in the congregation knew Kelley. While none of the victims has been publicly identified, First Baptist Church Pastor Frank Pomeroy told U.S. news networks that his 14-year-old daughter, Annabelle Renee Pomeroy, is among the deceased. Pomeroy was in Oklahoma at the time of the shooting but returned to Sutherland Springs.

He said all of the people killed Sunday were close friends. Pomeroy also said he wants the world to know his daughter “was one very beautiful special child.”

Pentagon correspondent Carla Babb contributed to this report