FBI agents search for evidence near the church where a mass shooting occurred in Sutherland Springs, Texas, the United States, Nov. 6, 2017. (Xinhua/Liu Liwei)
"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 outside the church in Sutherland Springs, about 65 km east of San Antonio.
He said that the suspect, identified as Devin Patrick Kelley, sent threatening text to his mother-in-law in the morning before launching the shooting attack.
"The mother-in-law attended the church. We know he sent threatening ... that she had received threatening text messages from him."
"The domestic situation will continue to be thoroughly investigated. This was not racially motivated," Martin said.
Texas Governor Greg Abbott said on Sunday that at least 26 people were killed after the gunman opened fire at the church in Sutherland Springs, a community of fewer than 400 residents.
The attack in the church was the deadliest mass shooting in the state's history, he added.
The lone gunman, dressed in black tactical gear and a ballistic vest, drove up to the First Baptist Church in Sutherland Springs at around 11:30 a.m. (1730 GMT) on Sunday and started firing inside.
As he left the church, a local resident grabbed his rifle and engaged with the suspect, Martin said.
The gunman, 26, was later found dead nearby in his car, apparently of a gunshot wound, after he fled the scene.
Sutherland Springs is an unincorporated community located on the old Spanish land grant of Manuel Tarin in northern Wilson County. According to the Handbook of Texas, the population was 362 in 2000.