A US Air Force veteran who fatally shot at least 26 people in a rural Texas church during Sunday services took his own life after a shootout with residents, the local sheriff said on Monday.

The gunman, who had been thrown out of the military for assaulting his wife and child, wounded at least 20 others during the rampage in the white-steepled First Baptist Church in the small town of Sutherland Springs.

After the gunman, dressed in black tactical gear and firing an assault rifle, left the church, two armed local residents pursued him in vehicles.

The chase ended when the gunman crashed his car and then shot himself, Wilson County Sheriff Joe Tackitt told CBS News in an interview on Monday morning.

"At this time we believe that he had a self-inflicted gunshot wound," Tackitt said.

The suspect was identified him as Devin Patrick Kelley, 26, multiple media reported, citing law enforcement officials.