WASHINGTON (AP) — President Donald Trump on Wednesday signed the repeal of a banking rule that would have allowed consumers to join together to sue their bank or credit card company to resolve financial disputes.

The president signed the measure at the White House in private. Journalists were not present to witness the signing.

The Republican-led Senate narrowly voted to repeal the Consumer Financial Protection Bureau's regulation, which the banking industry had been seeking to roll back.

The Trump administration and Republicans have pushed to undo regulations they say harm the free market and lead to frivolous lawsuits.

Democrats contend the rule would have given consumers more leverage to stop companies from financial wrongdoing. CFPB Director Richard Cordray, an appointee of former President Barack Obama, said in a statement that Trump had "signed away consumers' right to their day in court."

"This action tips the scales of justice in favor of Wall Street banks less than ten years after they caused the financial crisis," Cordray said.

If the rule had been allowed to go into effect in 2019, it could have exposed banks to large class-action lawsuits, a possibility that has taken gotten more attention following the sales practices scandal at Wells Fargo and the security breach at credit company Equifax.

The repeal means bank customers will still be subject to what are known as mandatory arbitration clauses. These clauses are buried in the fine print of nearly every checking account, credit card, payday loan, auto loan or other financial services contract and require customers to use arbitration to resolve any dispute with their bank. They effectively waive the customer's right to sue.

The overturning of the rule marks a notable victory for Wall Street. After the financial crisis, Congress and the Obama administration installed tough new regulations on how banks operated and fined them tens of billions of dollars for the damage they caused to the housing market.

But since Trump's victory last year, banking lobbyists have worked hard to get some of the rules repealed or replaced altogether.