 -- The suspect in a deadly rampage at a Texas church was able to purchase an assault rifle despite a law that restricts firearms from people convicted of domestic violence.

Under U.S. law, a person who has been convicted of a misdemeanor crime of domestic violence is prohibited from possessing firearms, but it is unclear if there are exceptions in this case that may have allowed the purchase to go forward.

Devin Kelley, 26, has been identified by federal and state law enforcement officials as the suspected shooter who killed 26 people and injured at least 20 others on Sunday morning in the First Baptist Church of Sutherland Springs, Texas. Kelley was found dead in his car after fleeing the scene, though investigators are still working to determine whether or not it was the result of a self-inflicted wound.

Kelley, who served in the Air Force from 2010 until 2014, was court-martialed in 2012 on charges of assault on his spouse and on their child. He received a bad conduct discharge, confinement for twelve months and a reduction of his military status.

Kelley purchased the Ruger model AR-556 rifle used in the shooting at a San Antonio sporting goods store in April 2016, according to a law enforcement official.