The suspected gunman in Sunday’s shooting at a church in Sutherland Springs, Texas, was involved in a “domestic situation” with his family, and his mother-in-law attended the church where the gunman opened fire, the FBI said Monday.

Law enforcement officials said they didn’t believe the shooting at the First Baptist Church was racially or religiously motivated. Instead, officials said Kelley "expressed anger" toward his mother-in-law, and sent her threatening text messages. They did not provide details on the domestic dispute.

Police believe Kelley, 26, opened fire on the church during Sunday services, killing 26 and wounding 20. Ten victims remain in critical condition. The victims range in age from 18 months to 77 years.

According to law enforcement, Kelley used a Ruger AR-556 in the attack, and police found two handguns — a Glock 9 mm and a Ruger .22-caliber — in his vehicle.

Kelley purchased four weapons over the last four years, beginning in 2014. Two were purchased in Colorado, and two were purchased in Texas.

Kelley, of New Braunfels, Texas, served in the U.S. Air Force from 2010 to 2014. He was court-martialed in 2012 for assault on his spouse and child, and received a bad conduct discharge. He also served a year in prison.

Federal officials said the authorities don’t know if Kelley was prohibited from having firearms. At the time of the shooting, however, he was not licensed to carry a firearm.

Kelley began opening fire from outside the church, and then continued to fire once inside. When a local resident heard gunfire, he engaged the shooter using his own rifle.

Police said Kelly was shot, and fled the scene in a Ford Expedition. The resident and another good Samaritan, Johnnie Langendorff, pursued Kelley.

Law enforcement said the 26-year-old called his father during the pursuit to tell him he had been shot and thought he was going to die. There is evidence Kelley died of a self-inflicted gunshot wound, police said.