The scandals put a human face on the practice of companies forcing customer disputes through a secret, non-judicial process. Days before the vote, Americans for Financial Reform addressed this directly in a video featuring a woman with disabilities and a veteran, who were ripped off by Wells Fargo and then prevented from a day in court because of an arbitration clause.

The House passed its version of the resolution within just a couple weeks of the CFPB finalizing the rule in July. But continuing reports of petty consumer fraud at Wells Fargo and a data breach of over 140 million customer accounts at the credit reporting bureau Equifax made it difficult for the Senate to proceed. Both Wells Fargo and Equifax have attempted to use arbitration clauses in their financial contracts to force victims out of class-action litigation.

To secure his victory, Trump enlisted an ex-Wells Fargo attorney, Acting Comptroller of the Currency Keith Noreika , and a former bank CEO, Treasury Secretary Steve Mnuchin, to do the dirty work. The Senate vote came a day after the Treasury entered the fray with guns blazing.

Only GOP Sens. Lindsey Graham of South Carolina and John Kennedy of Louisiana bucked their party — but a no vote when the measure passes is not much of a bucking. In a sign of how far the Democratic Party has come in recent years, all 48 members of the Senate caucus voted to keep the arbitration rule.

Both Corker and Flake, along with Sen. John McCain, R-Ariz., joined in the effort to give Trump a major win, even if it will hurt many of their own voters. Consumer advocates had hoped that moderate Republicans Lisa Murkowski of Alaska and Susan Collins of Maine would block the GOP effort. They did not.

With a razor-thin margin, the Senate passed a resolution to nullify a signature regulation from the Consumer Financial Protection Bureau, which banned forced arbitration provisions. Such clauses, tucked into the fine print of contracts that nobody reads, deny consumers the ability to contest claims through a class-action lawsuit and can allow banks and other financial institutions to rip off their customers with virtual impunity.

With national attention focused Tuesday morning on a mushrooming feud between President Donald Trump and Sen. Bob Corker, R-Tenn., followed by a feud in the afternoon between Trump and Sen. Jeff Flake, R-Ariz., the Senate gift-wrapped the biggest present Congress has so far bestowed upon Wall Street in the Trump era.

To pursue such cases, which typically involve small amounts of money, through arbitration, victims need to spend heavily on legal representation and hearings. As federal Judge Richard Posner of the 7th Circuit Court of Appeals once wrote in a ruling, “The realistic alternative to a class action is not 17 million individual suits, but zero individual suits, as only a lunatic or a fanatic sues for $30.”

And consumers typically don’t fare well in arbitration. An Economic Policy Institute report showed that consumers only win 9 percent of arbitration cases, and banks almost always win when they issue counterclaims, with the consumer paying $7,725 on average.

This is why corporations like the arbitration process — it prevents those wronged from pursuing their legal rights and, in practice, alters the law by making small claims virtually unenforceable. In other words, arbitration clauses are a license to steal. And it contributes to a fundamental breakdown of the justice system, in which complaints can only be heard in a privatized setting.

So in July, in a rare instance of the government using an outright ban instead of requiring disclosure or some other half-measure, the CFPB finished a rule preventing arbitration agreements in financial contracts from stopping consumers who band together with other victims in a class-action lawsuit. But Republicans managed to twist the issue into one in which corporations needed to be protected from greedy trial lawyers.

First, Noreika, a former defense lawyer for Wells Fargo who tried to push class-action suits into arbitration, argued the rule posed “safety and soundness” concerns for banks and would raise the cost of credit. Then this week, the Treasury Department, relying heavily on a discredited claim that plaintiff attorneys routinely shake down corporations with meritless claims, published a 17-page report attacking the CFPB rule.

The attacks from Trump’s executive agencies on a fellow regulator gave senators the cover they needed to side with Wells Fargo and Equifax over their customers. The Senate first tried to sneak in a vote on the resolution when the political world was distracted by the health care debate, but that didn’t work. It took shifting the framing of the rule from being about victims to being about trial lawyers for Senate Republicans to succeed.

Supporters of the CFPB rule, like Public Citizen’s Robert Weissman, called the vote a choice “between corporate donors and constituents.” Amanda Werner, who gained notoriety for dressing as the Monopoly Man during Senate hearings on Wells Fargo and Equifax, notes that lawmakers opposing the arbitration rule received over $100 million in campaign contributions from the financial industry during their careers. “These contributions help explain why lawmakers are willing to aid and abet big banks in ripping off their own constituents despite overwhelming bipartisan support for the rule,” Werner said in a statement to The Intercept.

Conservative groups, like the Heritage Foundation, made the resolution a “key vote” on its legislative scorecard, something Republicans pay a lot of attention to. That helped bring wavering senators on board.

The Chamber of Commerce and other financial lobbyists had joined together to sue the CFPB over the rule, but with the Senate’s successful vote, that will no longer be necessary. Trump is expected to sign the resolution. Not only would that nullify the arbitration rule, but the CFPB would be unable to work on any “substantially similar” regulation without express consent from Congress.

The Congressional Review Act, established in 1996, allows Congress to reverse regulations finalized by federal agencies with just a majority vote. This year, Congress has used CRA 14 times to kill rules completed during President Barack Obama’s tenure. This is the first resolution to kill a rule finalized in Trump’s term, albeit one from the CFPB, an independent agency that has retained its Obama-era director and senior leadership.

The vote was the first major conservative hit on the agency that was Massachusetts Sen. Elizabeth Warren’s brainchild. That appeared to be the unifying factor that enabled Republicans to side with Wells Fargo and Equifax. Sen. Dick Durbin, D-Ill., summed up the debate: “I know [Republicans] hate the Consumer Financial Protection Bureau like the devil hates holy water.”