The gunman who killed 26 people at a small-town Texas church had a history of domestic violence and sent threatening text messages to his mother-in-law, a member of First Baptist, before the attack in which he fired at least 450 rounds at helpless worshippers, authorities said Monday.

A day after the deadliest mass shooting in state history, the military acknowledged that it did not submit the shooter’s criminal history to the FBI, as required by the Pentagon. If his past offenses had been properly shared, they would have prevented him from buying a gun.

Investigators also revealed that sheriff’s deputies had responded to a domestic violence call in 2014 at Devin Patrick Kelley’s home involving a girlfriend who became his second wife. Later that year, he was formally ousted from the Air Force for a 2012 assault on his ex-wife in which he choked her and struck her son hard enough to fracture his skull.

In the tiny town of Sutherland Springs, population 400, grieving townspeople were reeling from their losses. The dead ranged from 18 months to 77 years old and included multiple members of some families.

“Our church was not comprised of members or parishioners. We were a very close family,” said the pastor’s wife Sherri Pomeroy, who, like her husband, was out of town when the attack happened. “Now most of our church family is gone.”

The couple’s 14-year-old daughter, Annabelle Pomeroy, was among those killed.

Kelley’s mother-in-law sometimes attended services there, but the sheriff said she was not at church on Sunday.

The massacre appeared to stem from a domestic situation and was not racially or religiously motivated, Texas Department of Public Safety Regional Director Freeman Martin said. He did not elaborate.

Based on evidence at the scene, investigators believe Kelley died of a self-inflicted gunshot wound after he was chased by bystanders, one of whom was armed, and crashed his car.

The 26-year-old shooter also used his cellphone to tell his father he had been shot and did not think he would survive, authorities said.

While in the military, Kelley served in logistics readiness at Holloman Air Force Base in New Mexico from 2010 until his 2014 discharge, Air Force spokeswoman Ann Stefanek said.

He was discharged for the assault involving his previous wife and her child and had served a year of confinement after a court-martial. Under Pentagon rules, information about convictions of military personnel for crimes such as assault should be submitted to the FBI’s Criminal Justice Investigation Services Division.

tefanek said the service is launching a review of its handling of the case and taking a comprehensive look at its databases to ensure other cases have been reported correctly.

A few months before he received the bad-conduct discharge, sheriff’s deputies went to his home to check out the domestic violence complaint involving him and his then-girlfriend. People in the house said there was no problem, and no arrests were made. Kelley married the girlfriend two months later.

Also in 2014, he was charged with misdemeanor animal cruelty in Colorado after a neighbor reported him for beating a dog. Kelley initially refused to speak with officers about the incident. He denied abusing the animal but complied with an order to pay almost $370 in restitution. He was also the focus of a protective order issued in Colorado in 2015.

Once the shooting started, there was probably “no way” for congregants to escape, Wilson County Sheriff Joe D. Tackitt Jr. said.

The gunman, dressed in black tactical gear, fired an assault rifle as he walked down the center aisle during worship services. He turned around and continued shooting on his way out of the building, Tackitt said.

About 20 other people were wounded. Ten of them were still hospitalized Monday in critical condition.

Investigators collected hundreds of shell casings from the scene, along with at least 15 empty magazines that held 30 rounds each.

Kelley lived in New Braunfels, about 35 miles (56 kilometers) north of the church, authorities said. Investigators were reviewing social media posts he made in the days before the attack, including one that appeared to show an AR-15 semi-automatic weapon.

Less than two months ago, Kelley had started a job as an unarmed security guard at a nearby resort.

He “seemed like a nice guy” and did not cause any problems, said Claudia Varjabedian, manager at the Summit Vacation Resort in New Braunfels.

On Sunday, the attacker pulled into a gas station across from the church, about 30 miles (48.28 kilometers) southeast of San Antonio. He crossed the street and started firing the rifle at the church, then continued firing after entering the white wood-frame building, Martin said.

As he left, the shooter was confronted by an armed resident who had grabbed his own rifle and exchanged fire with Kelley.

The armed man who confronted Kelley had help from another local resident, Johnnie Langendorff, who said he was driving past the church as the shooting happened. The armed man asked to get in Langendorff’s truck, and the pair followed as the gunman drove away.

“He jumped in my truck and said, ‘He just shot up the church. We need to go get him.’ And I said ‘Let’s go,’” Langendorff said.

The pursuit reached speeds up to 90 (144 kph) mph. The gunman eventually lost control of his vehicle and crashed. The armed man walked up to the vehicle with his gun drawn, and the attacker did not move. Police arrived about five minutes later, Langendorff said.

The assailant was dead in his vehicle. He had three gunshot wounds — two from where the armed man hit him in the leg and the torso and the third self-inflicted wound to the head, authorities said.

“There was no thinking about it. There was just doing. That was the key to all this. Act now. Ask questions later,” Langendorff said.

Church member Nick Uhlig, 34, who was not at Sunday’s service, told the AP that his pregnant cousin and her in-laws were among those killed. He later told the Houston Chronicle that three of his cousin’s children were also slain.

Three weapons were recovered. A Ruger AR-556 rifle was found at the church, and two handguns were found in the gunman’s vehicle, according to the Bureau of Alcohol, Tobacco, Firearms and Explosives.

The church has posted videos of its Sunday services on a YouTube channel, and authorities said they were reviewing footage recorded inside the church.

In a video of its Oct. 8 service, a congregant pointed to the Oct. 1 Las Vegas shooting a week earlier as evidence of the “wicked nature” of man. That shooting left 58 dead and more than 500 injured.

The previous deadliest mass shooting in Texas had been a 1991 attack in Killeen, when a mentally disturbed man crashed his pickup truck through a restaurant window at lunchtime and started shooting people, killing 23 and injuring more than 20 others.

Earlier coverage…

A man dressed in black tactical-style gear and armed with an assault rifle opened fire inside a church in a small South Texas community on Sunday, killing 26 people and wounding at least 16 others in what the governor called the deadliest mass shooting in the state’s history. The dead ranged in age from 5 to 72 years old.

Authorities didn’t identify the attacker during a news conference Sunday night, but two other officials — one a U.S. official and one in law enforcement — identified him as Devin Kelley. They spoke to The Associated Press on the condition of anonymity because they weren’t authorized to discuss the investigation.

The U.S. official said Kelley lived in a San Antonio suburb and didn’t appear to be linked to organized terrorist groups. Investigators were looking at social media posts Kelley made in the days before Sunday’s attack, including one that appeared to show an AR-15 semiautomatic weapon.

In a brief statement, the Pentagon confirmed he had served in the Air Force “at one point.” Air Force spokeswoman Ann Stefanek said records show that Kelley served in Logistics Readiness at Holloman Air Force Base in New Mexico from 2010 until his discharge. The date of his discharge and the circumstances under which he left the service were not immediately available.

Pastors of churches around Sutherland Springs, Texas described the moments after they were notified there had been a shooting at a church in town. More than 20 people were killed when a gunman opened fire during a service on Sunday. (Nov. 11)

At the news conference, the attacker was described only as a white man in his 20s who was wearing black tactical gear and a ballistic vest when he pulled into a gas station across from the First Baptist Church around 11:20 a.m.

The gunman crossed the street and started firing a Ruger AR rifle at the church, said Freeman Martin, a regional director of the Texas Department of Safety, then continued firing after entering the white wood-frame building, where an 11 a.m. service was scheduled. As he left, he was confronted by an armed resident who chased him. A short time later, the suspect was found dead in his vehicle at the county line, Martin said.

Several weapons were found inside the vehicle and Martin said it was unclear if the attacker died of a self-inflicted wound or if he was shot by the resident who confronted him. He said investigators weren’t ready to discuss a possible motive for the attack.

He said 23 of the dead were found dead in the church, two were found outside and one died after being taken to a hospital.

Addressing the news conference, Gov. Greg Abbott called the attack the worst mass shooting in Texas history. “There are no words to describe the pure evil that we witnessed in Sutherland Springs today,” Abbott said. “Our hearts are heavy at the anguish in this small town, but in time of tragedy, we see the very best of Texas. May God comfort those who’ve lost a loved one, and may God heal the hurt in our communities.”

Among those killed was the church pastor’s 14-year-old daughter, Annabelle Pomeroy. Pastor Frank Pomeroy, and his wife, Sherri, were both out of town in two different states when the attack occurred, Sherri Pomeroy wrote in a text message to the AP.

“We lost our 14 year old daughter today and many friends,” she wrote. “Neither of us has made it back into town yet to personally see the devastation. I am at the charlotte airport trying to get home as soon as i can.”

Federal law enforcement swarmed the small rural community of a few hundred residents 30 miles southeast of San Antonio after the attack, including ATF investigators and members of the FBI’s evidence collection team.

At least 16 wounded were taken to hospitals, hospital officials said, including eight taken by medical helicopter to the Brooke Army Medical Center. Another eight victims were taken to Connally Memorial Medical Center, located in Floresville about 10 miles from the church, including four who were later transferred to University Hospital in San Antonio for higher-level care, said spokeswoman Megan Posey.

Alena Berlanga, a Floresville resident who was monitoring the chaos on a police scanner and in Facebook community groups, said everyone knows everyone else in the sparsely populated county.

“This is horrific for our tiny little tight-knit town,” Berlanga said. “Everybody’s going to be affected and everybody knows someone who’s affected.”

Regina Rodriguez, who arrived at the church a couple of hours after the shooting, walked up to the police barricade and hugged a person she was with. She said her father, 51-year-old Richard Rodriguez, attends the church every Sunday, and she hadn’t been able to reach him. She said she feared the worst.

Church member Nick Uhlig, 34, wasn’t at Sunday’s service, but he said his cousins were at the church and that his family was told at least one of them, a woman with three children and pregnant with another, was among the dead.

“We just gathered to bury their grandfather on Thursday,” he said, shaking his head. “This is the only church here. We have Bible study, men’s Bible study, vacation Bible school. Somebody went in and started shooting.”

President Donald Trump, who was in Japan, where he was on an Asian trip, called the shooting an “act of evil” and said he was monitoring the situation.

“We’re shocked. Shocked and dismayed,” said state Sen. Judith Zaffirini, a Laredo Democrat whose district includes Sutherland Springs, a rural community known for its peanut festival, which was held last month. “It’s especially shocking when it’s such a small, serene area. These rural areas, they are so beautiful and so loving.”

Later Sunday, two sheriff’s vans were parked outside the gate of a cattle fence surrounding the address listed for Kelley on the rural, western outskirts of New Braunfels, north of San Antonio, preventing a group of waiting journalists from entering. Officials from the Comal County Sherriff’s Office and the Texas Rangers declined to comment or say if they had raided his home.

Ryan Albers, 16, who lives across the road said he heard intensifying gunfire coming from that direction in recent days.

“It’s really loud. At first I thought someone was blasting,” Albers said. “It had to be coming from somewhere pretty close. It was definitely not just a shotgun or someone hunting. It was someone using automatic weapon fire.”

The church has posted videos of its Sunday services on a YouTube channel, raising the possibility that the shooting was captured on video.

In a video of its Oct. 8 service, a congregant who spoke and read Scripture pointed to the Oct. 1 Las Vegas shooting a week earlier as evidence of the “wicked nature” of man. That shooting left 58 dead and more than 500 injured.

Until Sunday, the deadliest mass shooting in Texas had been a 1991 attack in Killeen, when a mentally disturbed man crashed his pickup truck through a restaurant window at lunchtime and started shooting people, killing 23 and injuring more than 20 others.

The University of Texas was the site of one of the most infamous mass shootings in American history, when U.S. Marine sniper Charles Whitman climbed the Austin campus’ clock tower in 1966 and began firing on stunned people below, killing 13 and wounding nearly three dozen others. He had killed his wife and mother before heading to the tower, one victim died a week later and medical examiners eventually attributed a 17th death to Whitman in 2001.

Complete coverage of the Mass Shooting at a First Baptist Church in Sutherland Springs, San Antonio, Texas. More than 20 dead, many more injured.