Texas church gunman Devin Patrick Kelley had three guns and had been involved in a domestic row with his mother-in-law, officials have said.
The attack on the small church outside of San Antonio during Sunday services left 26 people dead and 20 injured.
The gunman called his father after he was shot by an armed bystander, and said he did not think he would survive.
Kelley was not legally permitted to own the weapons, which included an assault rifle and two handguns, police said.
Freeman Martin, the regional director for the Texas Department of Public Safety, told reporters it appeared that Kelley died from a self-inflicted gunshot wound after first being shot by a "Good Samaritan".
Officials have not yet identified the victims.
"This was not racially motivated, it wasn't over religious beliefs," Mr Martin said.
"There was a domestic situation going on with the family and in-laws," he said, adding that the mother-in-law had received threatening text messages from Kelley in recent days.
Wilson County Sheriff Joe Tackitt said that family members had not been present at the time of attack.
Officials have not yet identified the victims in the small town of Sutherland Springs.
Ten of the injured victims are in hospital in critical condition, with officials warning that the death toll could rise.
Kelley was court-martialed in 2012 after he was accused of assault against his wife and child. He was sentenced to 12 months confinement.
He received a "bad conduct" discharge two years later, according to Ann Stefanek, a US Air Force spokeswoman.
Texas Governor Greg Abbott said on Monday: "It's clear this is a person who had violent tendencies, who had some challenges, and someone who was a powder keg, seeming waiting to go off."
Mr Abbott added that the attacker should not legally have been allowed to own a firearm, after having been denied a gun owner's permit by the state.