The gunman who opened fire on a Texas church Sunday morning cleared a background check to buy his weapons, despite having been discharged from the military for bad conduct, CNN reported. Devin Patrick Kelley, 26, purchased the Ruger AR-556 rifle used in the shooting in April 2016 from an Academy Sports & Outdoors store in San Antonio. He reportedly said he didn’t have any disqualifying criminal history on his background check. Kelley, however, had been discharged from the military under dishonorable circumstances in 2014 after being court-martialed for assaulting his wife and their child. The discharge reportedly did not show up as a prohibited offense on his background check. Texas Gov. Greg Abbott said Monday morning that Kelley had previously been denied a state license to carry. Wilson County Sheriff Joe Tackitt said Kelley died of a self-inflicted gunshot after a high-speed chase.