WASHINGTON — The House voted to roll back an Obama era regulation that mandated the Social Security Administration reveal information about people with mental illness through the National Instant Criminal Background Check System (NICS). The measure passed 235 to 180.

The intention of the regulation, put forth during the final days of President Obama’s term, instructed the SSA to show information about individuals with mental illnesses would be deemed incapable of owning a firearm.

However, critics of the rule say that the SSA went out of bounds with the regulation and denied due process to Americans with disabilities.

“The Social Security Administration not only overstepped its mission with this regulation, it discriminated against certain Americans with disabilities who receive Social Security benefits. The agency should be focused on serving all of its beneficiaries, not picking and choosing whose Second Amendment rights to deny,” Texas Republican Rep. Kevin Brady, chairman of the ways and means committee, said.

“The American people and the families that are being hurt day after day by gun violence — they deserve some due process too,” Democratic Texas Rep. Lloyd Doggett responded.

Opponents of the SSA Obama era regulation included the National Rifle Association and the American Civil Liberties Union. The repeal of the rule is part of the Congressional Review Act Republicans are now using to roll back a series of regulations President Obama’s administration established right before he left office.

Iowa Republican Sen. Chuck Grassley introduced a resolution Monday in the upper chamber, a partner provision to the House version passed Thursday, to ­roll back the SSA gun control measure.

“The Justice Department, the Department of Veterans Affairs, and the Social Security Administration have not protected Second Amendment rights adequately under the Obama administration. Our fundamental Second Amendment rights were constantly under attack,” Grassley said in a statement.

He went on to say, “For example, hundreds of thousands of veterans have been reported to the National Instant Criminal Background Check System without due process. That system amounts to a national gun ban list for those reported erroneously. Veterans were reported without first having a neutral authority find them to be a danger to self or others.”

President Donald Trump is expected to sign the measure after its passage in the Senate when it gets to his desk.

Follow Kerry on Twitter