WASHINGTON — The Republican-controlled Congress on Thursday scrapped an Obama-era rule on the environment and took aim at another rule on guns, counting on a new ally in the White House to help reverse years of what Republicans call excessive regulation.

The Senate gave final approval to a measure eliminating a rule to prevent coal mining debris from being dumped into nearby streams, while the House backed a separate bill that would do away with extended background checks for gun purchases by some Social Security recipients with mental disabilities.

The Senate’s 54-45 vote sends the repeal of the stream protection rule to President Trump, who is expected to sign it. Maine Sen. Susan Collins was the only Republican to vote against the repeal. Sen. Angus King, an independent, also opposed repeal.

The Interior Department, which announced the rule in December, said it would protect 6,000 miles of streams and 52,000 acres of forests near waterways. But Republicans and some Democrats say the rule could eliminate thousands of coal-related jobs and ignores dozens of federal, state and local regulations already in place.

The vote was the first in a series of actions that Republicans are expected to take in coming weeks to reverse years of what they call excessive regulation during President Barack Obama’s tenure. Rules on fracking, federal contracting and other issues also are in the cross-hairs.

Senate Majority Leader Mitch McConnell, R-Ky., called the stream rule “an attack against coal miners and their families” and said it would have threatened coal jobs and caused major damage to communities in Kentucky and other coal-producing states.

“The legislation we passed today will help stop this disastrous rule and bring relief to coal miners and their families,” McConnell said.

Democrats called the vote an attack on clean water and a clear win for big coal-mining companies and other polluters.

Sen. Maria Cantwell, D-Wash., said the stream rule had nothing to do with the decline of coal, which faces stiff competition from cheap natural gas.

“This rule was not in place” when coal production began declining in the past half-dozen years, Cantwell said.

In the House, the issue was an Obama rule extending background checks for disabled Social Security recipients mentally incapable of managing their own affairs. The House voted 235-180 to scuttle it. Maine Rep. Bruce Poliquin, a Republican, voted with the majority, and Rep. Chellie Pingree, a Democrat, did not vote.

Under the rule, the Social Security Administration had to provide information to the gun-buying background check system on certain recipients with a mental disorder. The rule would have affected an estimated 75,000 beneficiaries.

“There is no evidence suggesting that those receiving disability benefits from the Social Security Administration are a threat to public safety,” said Rep. Bob Goodlatte, R-Va. “Once an unelected bureaucrat unfairly adds these folks to the federal background check system, they are no longer able to exercise their Second Amendment right.”

After the 2012 school massacre in Newtown, Connecticut, Obama directed the Justice Department to provide guidance to agencies regarding information they are obligated to report to the background check system.

In Newtown, 20 children and six educators were shot to death when a gunman entered the Sandy Hook Elementary School on Dec. 14, 2012. The gunman had earlier killed his mother inside their home, and he used a gun and ammunition that she had purchased. His mental health problems have been extensively reported since the shooting.

Democrats said Republicans were doing the bidding of the National Rifle Association, which opposed the Social Security Administration’s rule.

“These are not people just having a bad day,” said Rep. Mike Thompson, D-Calif. “These are not people simply suffering from depression or anxiety or agoraphobia. These are people with a severe mental illness who can’t hold any kind of job or make any decisions about their affairs, so the law says very clearly they shouldn’t have a firearm.”

The NRA said overturning the regulation will protect a broad class of vulnerable citizens from government overreach. And the American Civil Liberties Union agreed, telling lawmakers that a disability should not constitute grounds for the automatic denial of any right or privilege, including gun ownership.

Republicans are employing a rarely used tool to roll back some of the rules issued in the final months of Obama’s tenure. The Congressional Review Act provides a temporary window for a simple majority of both chambers to invalidate a rule. Trump would have to sign the disapproval measure for a regulation to be deemed invalid.

The law also prevents the executive branch from imposing substantially similar regulations in the future.

Repeal of the coal mining regulation was supported by four Democrats: Joe Donnelly of Indiana, Heidi Heitkamp of North Dakota, Joe Manchin of West Virginia and Claire McCaskill of Missouri. All four face re-election battles next year in states Trump won.