The 26-year-old gunman in Sunday's church shooting in Texas served briefly in the U.S. Air Force until a reported bad conduct discharge.

Authorities did not immediately identify a motive for why Devin Kelley opened fire at First Baptist Church of Sutherland Springs, Texas. Kelley lived in the San Antonio suburb of New Braunfels.

This undated photo provided by the Texas Department of Public Safety shows Devin Kelley, the suspect in the shooting at the First Baptist Church in Sutherland Springs, Texas, on Nov. 5, 2017. A short time after the shooting, Kelley was found dead in his vehicle.

Air Force spokeswoman Ann Stefanek told USA TODAY that Kelley served in Logistics Readiness at Holloman Air Force Base in southern New Mexico from 2010 until his discharge.

Kelley was court-martialed in 2012 for assaulting his spouse and their child — he received a bad conduct discharge, was confined for 12 months and busted to the grade of E-1. He was discharged in 2014. 

Sunday's shooting killed at least 26, including several children.

Law enforcement officials said Kelley was found dead in his vehicle a short time after the shooting, after he drove off the road in a neighboring Texas county. Officials did not immediately say whether Kelley was killed by a self-inflicted gunshot or by one received from a good Samaritan who pursued him from the church.

More: Texas gun laws are among most lax in the nation

More: 3 mass shootings in the past 17 months have been among the nation's bloodiest

More: Trump tweets 'May God be w/ the people of Sutherland Springs'

More: Texas Motor Speedway drops pistol celebration in light of mass shooting at Texas church

More: Stars react to Texas church shooting with grief, disbelief: 'No words. Numb. Again.'

More: First Baptist Church pastor's 14-year-old daughter among dead: A 'beautiful, special child'

More: Sutherland Springs church shooting: What we know now

More: Gunman opens fire at Texas church, kills 26

Contributing: Tom Vanden Brook, USA TODAY. Follow Greg Toppo on Twitter: @gtoppo