U.S. Sen. Shelley Moore Capito, R-W.Va., was among 57 senators to vote to overturn a rule requiring background checks on some Social Security recipients that was passed during the final days of the administration of President Barack Obama.

The rule would have prohibited gun ownership by Social Security recipients who receive disability payments for mental health reasons, including depression or an eating disorder, whose disability requires a payee to manage their financial affairs.

Opponents of the rule argued it stripped Social Security recipients of their Second Amendment rights without due process, while supporters believe the rule was needed to keep guns out of the hands of people who might hurt themselves or others.

“Overturning this anti-Second Amendment rule is the right step,” Capito said. “The rule is overly broad, has no impact on existing gun-safety laws, and unfairly advances misguided stereotypes about individuals with disabilities. I have always fought to protect the Second Amendment rights of law-abiding Americans, and I will not support attempts to revoke someone’s constitutionally protected right without due process.”

The rule, reviewed under a Congressional Review Act resolution, passed the U.S. House of Representatives on Feb. 2 and passed the Senate by a vote of 57-43.

According to Capito’s staff, overturning the rule was supported by the American Civil Liberties Union because of the rule’s violation of due process, the National Rifle Association because of its impact on Second Amendment rights, and various disability groups including the National Council on Disability, who wrote that the rule “stigmatizes a group of people who are not likely to perpetuate the kind of violence the rule hopes to address.”

The measure is on its way to President Donald Trump for his signature.