“The suspect dropped his rifle, which was a Ruger AR assault-type rifle and fled from the church,” Martin said.

The man then chased the gunman, Martin said.

When police spotted the suspect’s vehicle a short time later at the county line, they found the gunman inside — dead of a bullet wound. He was later identified as Devin Patrick Kelley.

“At this time, we don’t know if it was a self-inflicted gunshot wound or if he was shot by the local resident,” Martin said.

Authorities didn’t offer additional details, nor identify the resident or the gunman. They will likely elaborate more in subsequent media briefings.

“They are continuing in their efforts as they put all the pieces of a very complex puzzle together to try to provide their community all the answers they need and deserve,” Texas Gov. Greg Abbott said.

The shooting at the church claimed 26 lives. Twenty-three of the dead were found dead inside the church, officials said.

It’s the deadliest mass shooting in Texas history — and the fifth deadliest in modern US history.

The Sutherland Springs resident’s actions echoed another man’s act of bravery during a different church shooting earlier this year in Antioch, Tennessee.

As the service at the Burnette Chapel Church of Christ was ending on September 24, a gunman — whom police identified as 25-year-old Emanuel Kidega Samson — entered the church with a pair of pistols and started firing. An usher at the church, Robert Engle, sprang into action — struggling with the suspect, even as he was being pistol-whipped, police said.

“Mr. Samson didn’t expect Mr. Engle to encounter him, to struggle with him, to try to stop the shooting,” said Don Aaron, the spokesman for the Metropolitan Nashville Police Department.

During the altercation, the gunman accidentally shot himself in the chest with his own weapon, police said.

When the gunman fell, Engle, despite his head injuries, ran to his car and came back with a pistol of his own, police said.

Engle, who has a permit for a handgun, then made sure Samson stayed on the ground until officers arrived, Aaron said.