At least 26 people were killed Sunday after Devin Patrick Kelley, 26, opened fire on a group of churchgoers inside the First Baptist Church in Sutherland Spring, Tex.
The attack was the deadliest church shooting in modern U.S. history and the deadliest shooting in state history.
In light of the event, here’s what you need to know about Texas gun laws.
Texas gun law 101
Gun critics argue that Texas gun laws are relatively lax. But Justin Sparks, a Firearms Program Attorney through the Texas Law Shield, a legal defense fund, told Fox News on Monday that “Texas is probably the middle of the pack,” adding that “there’s not a lot of prohibiting, but there is a lot of supervising.”
“Generally speaking, in Texas, as long as you’re of age  and can pass the background check, you can buy a gun,” Sparks told Fox News on Monday.
However, a person must be 21-years-old before they can buy a handgun, he said.
Sparks added that there’s no special license to purchase a gun in Texas. Indeed, according to the lobbying arm of the National Rifle Association, “a Texas resident, if not otherwise precluded by law, may purchase rifles and shotguns, ammunition, reloading components, or firearms accessories in contiguous states.”
There’s also no license to carry a gun once it’s purchased, he said. However, a permit is required to carry a handgun. And thanks to a bill that was passed in the Texas Legislature in 2015, handgun permit holders can now carry their handguns openly, Sparks said.
Overall, gun owners can keep the firearm in their home, vehicle or place of employment if their place of employment allows firearms in the building. In order to take it outside of those areas, however, a license is required, Sparks said.
Problems typically arise when “someone goes and buys a firearm and doesn’t educate themselves on where they can carry it, or leaves it out in the open in their car,” he said.
Who cannot buy a gun in Texas?
Texas adheres to federal law when it comes to who can and cannot buy a gun, Sparks said.
If a person has been convicted of a felony, they cannot buy a gun. Firearm distributors who have a Federal Firearm License, or a FLL, can easily find out if someone has been convicted of a felony by running a background check, Sparks said.
Additionally, if a person is under indictment for an “offense that can land you in jail for more than a year,” Sparks said, you cannot have firearm in Texas.
But five years after a convicted felon completes his or her sentence, they can own a gun again — if they keep it in their home. However, Sparks acknowledged that this Texas law conflicts with federal law– meaning that if it’s reported, it could result in that person’s arrest.
Additionally, those who are deemed “mentally unfit” by the state are prohibited from owning a gun — an issue that Sparks said is “evolving” within the Texas legislature.
“I wouldn’t be surprised if the state eventually passes something that requires a disclosure of all mental health records– even if they [the gun purchaser] were at a private mental health facility,” he said.
Given his background, how did Devin Kelley get a gun?
Kelley previously served in the U.S. Air Force, but was discharged in 2014, an Air Force spokesperson confirmed to Fox News on Monday.
He was court-martialed in 2012 for assaulting his wife and child. He was then sentenced to 12 months in custody before being given a bad conduct discharge.
A 1968 Gun Control Act made it unlawful for a licensed firearms dealer to sell a weapon to any person who is given a dishonorable discharge. But because Kelley was discharged on bad conduct, the law was not triggered, Adam Winkler, a professor of law and a specialist in American constitutional law at the University of California at Los Angeles, told Fox News on Monday.
Kelley purchased two firearms from two separate Academy Sports + Outdoors stores in San Antonio in 2016 and 2017, respectively, the sporting goods store confirmed to Fox News in a statement on Monday. One of the purchases was allegedly a Ruger model AR-556 rifle.
“We also confirmed that both sales were approved by the National Instant Criminal Background Check System (NICS). We are cooperating with law enforcement as they investigate further,” the statement reads.
However, Kelley’s domestic violence charges should’ve been enough to prevent him from purchasing a gun, Winkler said — but the Air Force most likely didn’t report this information to the federal background check system, thus allowing the purchase to go forward.
“The underlying crime [domestic violence] in and of itself should’ve been enough,” Winkler said.
“But for some reason, the military hasn’t been reporting bad conduct discharges.”
The gunman was also denied a Texas handgun permit, Texas Gov. Greg Abbott told “Fox & Friends” on Monday.
“He was rejected either because he did not fully answer all the questions that are required to get a Texas gun permit, or he answered those questions wrong, that we still don’t know,” Abbott said.
The “biggest mystery,” Winkler said, is how Kelley was denied a handgun permit but was allowed to purchase a gun from the sporting goods store. But this information is currently unclear.
Additionally, Texas authorities confirmed Monday that Kelley did not have a license to carry. However, he did have a private security license — often used by armed and unarmed security guards, personal protection officers, private investigators, and more, according to the Texas Department of Public Safety.
A criminal background check is typically required before someone can receive a private security license.