SUTHERLAND SPRINGS, Tex. — Law enforcement officers investigating the mass shooting at a church that killed 26 people here said on Monday that “a domestic situation” within the gunman’s family may have motivated the killing.

“The suspect’s mother-in-law attended this church,” Freeman Martin, a spokesman for the Texas Department of Public Safety, said during a news conference Monday morning. “We know that he had made threatening texts and we can’t go into detail into that domestic situation that is continuing to be vetted and thoroughly investigated.”

“This was not racially motivated, it wasn’t over religious beliefs, it was a domestic situation going on,” Mr. Martin added.

The moments following the horrific mass shooting on Sunday morning came into clearer view on Monday, as the county sheriff detailed a firefight and car chase that ended with the gunman, Devin P. Kelley, 26, dead after a crash.

The recurrent bursts of gunfire were the first sign of trouble at the First Baptist Church in this rural Texas town, but even that said little about the horrors that had befallen the faithful at their house of worship. Inside, pools of blood splattered across the small church led back to dozens of dead and dying parishioners.

As many as 14 children and a pregnant woman lay lifeless. Those dead inside the church ranged from 18 months to 77 years of age, according to law enforcement officials.

Sheriff Joe Tackitt of Wilson County said that law enforcement found “blood everywhere” inside the church. “Wherever you walked in the church, there was death,” he said.

Sheriff Tackitt said he believed the gunman went around the outside of the church firing rounds before entering and shooting at parishioners. After he left the church, he and an armed bystander engaged in a brief “firefight” before Mr. Kelley got into his vehicle, according to the sheriff. The gunman had dropped his rifle in the church after slaughtering the parishioners; he pulled a pistol during his exchange with the bystander.

Mr. Kelley contacted his father from his cellphone during the chase to tell him that he had been shot, according to law enforcement. Mr. Kelley told his father that he “didn’t think he was going to make it.” He subsequently shot himself, though officials said they were not yet sure if that shot had caused his death.

Left behind at the church alongside the bodies were 30-round clips and “dozens of rounds” of ammunition, potentially hundreds. The sheriff said he had seen nothing to suggest that the gunman had modified his weapon to make it act like an automatic firearm, like the gunman in the mass shooting in Las Vegas who had used a “bump stock.”

The sheriff described a horrific and methodical killing. Mr. Kelley appeared to have begun at the front of the church, having “shot his way in,” and fired his weapon from side to side as he paced through the room.

“There was nothing anyone could do until he came out,” Sheriff Tackitt said. The sheriff later declined to give more information about what had happened inside the church.

The bystander — whom Sheriff Tackitt called a “hero” but declined to give his name — waved down a man in a vehicle and the two began pursuing the gunman, Sheriff Tackitt said in an interview with CBS. They may have engaged in a firefight along the way before the gunman’s vehicle crashed into a fence.

Johnnie Langendorff, the driver, said in an interview with local ABC News television affiliate KSAT that he sprang to action after he encountered the two men exchanging gunfire. After the armed bystander explained the situation, the two took off after the gunman. “He got a little bit of a jump on us. We were doing about 95” — miles per hour — “around traffic and everything. Eventually he came to a slowdown and we got within just a few feet of him and he got off the road.”

Mr. Langendorff said that the gunman lost control of his vehicle. Langendorff parked and the armed bystander drew his rifle, which he kept trained on the gunman’s vehicle until police officers arrived on the scene about five minutes later, he said. The two men had been on the phone with police dispatch during the chase.

The in-laws and Mr. Kelley’s ex-wife were interviewed by investigators last night in Sutherland Springs. They were not in the town at the time of the shooting, according to law enforcement officials.

Mr. Kelley was clad in all black, with a ballistic vest strapped to his chest and a military-style rifle in his hands, when he opened fire on parishioners, turning this tiny town east of San Antonio into the scene of the country’s newest mass horror.

He had served in the Air Force at a base in New Mexico but was court-martialed in 2012 on charges of assaulting his wife and child. He was sentenced to 12 months’ confinement and received a “bad conduct” discharge in 2014, according to Ann Stefanek, the chief of Air Force media operations.

Mr. Kelley did not have a license to carry, according to investigators who briefed the news media on Monday morning, but he had a private security license “similar to a security guard at a concert,” according to investigators. Three weapons belonging to Mr. Kelley were recovered during the investigation — a rifle at the church and two handguns in his car.