The dead gunman in the Sutherland Springs, Texas, church shooting was a former airman who was discharged from the military for bad conduct and may have been conducting target practice on his property last week, sources say.

Details continue to trickle out Monday about the man police say is responsible for the worst mass shooting in Texas history.

Devin Patrick Kelley, 26, was killed after the shooting, either by his own hand or by a gunshot from a local resident who engaged and chased Kelley, police say.

"It's a senseless crime, but we can tell you that there was a domestic situation going on within this family," said Chris Combs, special agent in charge of the FBI's San Antonio division, explaining that Kelley's mother-in-law, who attended First Baptist, had received threatening texts from Kelley, including one Sunday morning. He declined to elaborate.

Kelley was once a member of the US Air Force, spokeswoman Ann Stefanek said. He served in logistics readiness at Holloman Air Force Base in New Mexico, starting in 2010.

Kelley was court-martialed in 2012 for two counts of Article 128 of the Uniform Code of Military Justice, assault on his spouse and assault on their child, Stefanek said. Kelley received a bad conduct discharge, confinement for 12 months and a reduction in rank, she said. The Air Force did not provide a date of the discharge.

In June, he was registered as a noncommissioned security officer, affiliated with Schlitterbahn Waterpark and Resort in New Braunfels, where he lived, according to the state Department of Public Safety. In order to complete the registration, Kelley would have submitted fingerprints and fees.

Schlitterbahn has yet to respond to CNN questions about whether Kelley was employed by the water park.

Kelley is accused of killing 26 people Sunday, including the 14-year-old daughter of the church's pastor, and injuring more. His victims range in age from 18 months to 77 years old, Department of Public Safety regional director Freeman Martin said.

A man who lives next door to the church grabbed his own gun and approached Kelley as he was leaving after the shooting. The gunman dropped a rifle in front of the church and fled in his car, officials said.

Kelley was found dead in his car from a gunshot wound about 8 miles from the church, a law enforcement official briefed on the investigation told CNN.

It appears a civilian shot Kelley, and then he shot himself, Wilson County Sheriff Joe Tackitt said, but authorities are awaiting word from the coroner on which wound killed him.

Whether Kelley had any religious affiliation is unclear, though the First Baptist Church of Kingsville, two hours south of Sutherland Springs, issued a statement saying that, while Kelley was not a member of the church, he volunteered one night during the congregation's 2014 Vacation Bible School.

Kelley purchased the Ruger AR-556 rifle in April 2016 from an Academy Sports & Outdoors store in San Antonio, a law enforcement official told CNN.

When Kelley filled out the background check paperwork at the store, he checked the box to indicate he didn't have disqualifying criminal history, the official said. He listed an address in Colorado Springs, Colorado, when he bought the rifle, the official said.

The shooter also had a handgun, Tackitt said, but it's not clear if he fired the handgun inside the church.

Robert Gonzalez, who lives near Kelley's residence in New Braunfels, about 35 miles north of Sutherland Springs, said he heard gunfire coming from Kelley's property every morning while he was working out on his porch last week.

"A load of rounds that would always be going off this time," he told CNN. "A .45 to an assault rifle, like a rapid fire all of a sudden. I was concerned because it was so close to our house."

It's not unusual for people in the area to practice firing on targets, said Gonzalez, who can identify guns by their sound because he served in the armed forces, but this was an unusual amount of gunfire.

Texas Gov. Greg Abbott, who called the incident the largest mass shooting in the state's history, said information from the Texas Department of Public Safety shows Kelley was at one point denied a license to carry a weapon.

"Devin Kelley sought to get a license to carry a gun in the state of Texas, but the State of Texas denied him the ability to get a gun," the governor told CNN.