With Vice President Mike Pence casting the deciding vote, the Senate voted late Tuesday night to undo a rule issued by the Consumer Financial Protection Bureau that would bar financial firms from contracts that rule out class-action lawsuits related to their products. The measure now goes to President Trump's desk.

Two Republicans, Lindsey Graham of South Carolina and John Kennedy of Louisiana, voted no, forcing Pence to break the tie.

The rule in question, commonly referred to as the forced-arbitration rule, was drafted during former President Barack Obama's tenure and finalized in July by Bureau Director Richard Cordray, an Obama appointee. It prevents banks and other financial firms from including clauses in contracts that steer customers away from class-action suits and into private arbitration.

Democrats say that the new rule is necessary to empower consumers to fight being ripped off. Republicans have criticized the rule as a giveaway to trial lawyers.

"We passed this Congressional Review Act resolution to protect consumers from wrong doing, while avoiding frivolous lawsuits that will only drive up costs for the millions of Americans who carry a credit card," said Senate Majority Leader Mitch McConnell. "The CFPB continues to be one of the most unaccountable bureaucracies in Washington and this Congress will continue to stand up for consumers even when the CFPB will not."

Speaking on the Senate floor, Sen. Sherrod Brown of Ohio called the vote "frankly outrageous," and said that it would limit the rights of victims of corporate misdeeds like the Wells Fargo fake accounts scandal or the Equifax data breach.

The GOP was able to pass the measure canceling the rule via the Congressional Review Act, a special procedure that allows for undoing new regulations soon after they are finalized. Before Tuesday's vote, congressional Republicans and Trump had used the special law to repeal 14 different Obama-era regulations.

Tuesday's vote will put an end to an unusual regulator-versus-regulator fight between the bureau's director, Richard Cordray, and Trump-appointed officials. The last salvo was issued Monday, when the Trump Treasury released an analysis criticizing the rule and the bureau's justification for it. Once a rule is canceled through the Congressional Review Act, the relevant agency cannot revisit the same area unless authorized by Congress.

The House had voted in July to end the rule, but it had not been clear until Tuesday that the GOP would have the votes in the Senate.

Financial industry groups, including ones representing banks, credit unions, and credit cards, had pushed hard for Republicans to undo the rule, and applauded Tuesday's late-night vote.

Consumer groups and some veterans groups wanted the CFPB rule to stay in place.

"The Senate majority today subverted our basic, constitutional right to go to court and hold big Wall Street banks accountable if they break the law, a step that makes an already unfair financial system more unjust for ordinary Americans," said Lisa Donner, executive director of Americans for Financial Reform.