WASHINGTON ― Congressional Republicans want to undo an Obama administration initiative designed to keep mentally ill people from buying guns.

The House of Representatives voted Thursday, mostly along partisan lines, to stop the Social Security Administration from telling the FBI about disability insurance recipients who have mental impairments that should disqualify them from buying guns.

The Obama administration pushed the measure as part of a broader gun control effort following the 2012 massacre at Sandy Hook Elementary School. The Social Security Administration finalized the rule in December.

Republicans and the National Rifle Association blasted the initiative as unconstitutional gun-grabbing. Rep. Sam Johnson (R-Texas) introduced legislation to block the rule last year.

“We need to protect rights of all Americans, including individuals with disabilities,” Johnson said then, referring to Second Amendment rights.

Now that it has passed the House, Johnson’s bill will head to the Senate before it can reach President Donald Trump’s desk.

The Brady Campaign to Prevent Gun Violence condemned Thursday’s vote.

“Repealing this rule weakens and undermines the Brady background check system that has blocked more than three million gun sales to dangerous people since 1994,” Brady Campaign President Dan Gross said in a statement.

The Obama administration’s rule required the Social Security Administration to notify the National Instant Criminal Background Check System of any disability or Supplemental Security Income beneficiaries who require their benefits to be paid through a representative because they are incapable of handling their own finances. The Department of Veterans Affairs follows a similar policy.

Gun enthusiasts aren’t the only ones skeptical of the disability background check scheme, however. The National Council on Disability, an independent federal agency that advises the government on disability issues, has frowned on the policy.

“Including anyone beyond those who are currently prohibited from gun purchase under existing law in such an effort would advance an inaccurate and discriminatory inference that equates the need for assistance in managing finances with a presumption of incapacity in other areas of life,” the agency said in a statement last year.

Roughly 11 million Americans receive disability benefits because of an impairment that prevents them from working.