President Trump said the Texas church shooting was largely a “mental health” problem, but at the beginning of his presidency he rolled back a regulation that would have made it harder for people with histories of mental illness to purchase guns.

In February 2017, Trump signed a bill that undid a regulation from Barack Obama’s presidency which said the Social Security Administration would have to report certain mentally ill recipients and people deemed unfit to handle their own financial affairs to the national background check database, NBC reports. The Obama Administration said the rule would have added 75,000 names to the database.

The rule would only “impact a person if he or she has been determined to be so severely impaired by a mental condition that he or she is unable to manage his or her own benefits, in which case, he or she is already prohibited from purchasing or possessing guns,” Lindsay Nichols, senior attorney at the Law Center to Prevent Gun Violence, said in congressional testimony in February. “The new rule will simply prevent this person from passing a gun purchaser background check only until after an evaluation of their specific capacity to take on the responsibilities of gun ownership.”

The National Rifle Association, on the other hand, cheered Trump rescinding the rule as a win for Second Amendment rights. Other supporters of Trump’s action, like Republican Sen. Chuck Grassley of Iowa, argued that the regulation infringed upon civil liberties and took away gun rights without due process of law. “If a specific individual is likely to be violent due to the nature of their mental illness,” Grassley said, “then the government should have to prove it,” NPR reports.

Responding to Sunday’s mass shooting at a church in South Texas, which left at least 26 people dead and 20 others injured, Trump said, “I think that mental health is your problem here.” He added, “We have a lot of mental health problems in our country, as do other countries. But this isn’t a guns situation.”

Shooting suspect Devin Kelly reportedly assaulted his spouse and child years ago, but it is not yet known how or when he purchased the gun used in the shooting.

According to data from the U.S. Department of Health and Human Services, only 3 to 5% of violent acts can be attributed to individuals living with a serious mental illness.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Tessa Berenson at tessa.berenson@time.com.