Republicans quietly gutted a major consumer protection Tuesday that allowed customers to band together for class-action lawsuits against big banks and credit card companies.

In a major victory for Wall Street, the Senate killed the rule by one vote, cast by Vice President Mike Pence. Republican Senators Lindsey Graham and John Kennedy voted with the Democrats against repeal.

GOP Senators Jeff Flake and Bob Corker — who earlier Tuesday had slammed the Trump White House as as “outrageous” and “debasing” — both voted with the VP.

Republicans have been bent on killing the rule since it was first published by the Consumer Financial Protection Bureau in July. The measure will now go to Trump’s desk for signature.

“Wall Street won and ordinary people lost,” Richard Cordray, the director of the CFPB, said Tuesday.

The banking industry has been lobbying hard against the regulation, with GOP lawmakers eager to claim it harms the free market.

The rule’s removal will impact tens of millions of consumers who have signed up for credit cards, checking accounts or prepaid cards.

The CFPB said the regulation would eradicate arbitration clauses many companies put into customer contracts in order to keep disputes out of the courtroom.

However, the White House said the CFPB’s rule “would neither protect consumers nor serve the public interest.”

Mike Crapo, the Senate banking committee chairman, blamed the Bureau for the rule’s demise. “The CFPB chose an all-or-nothing approach, leaving Congress no choice but to overturn it,” he said.