By Alan Rappeport and Emily Flitter

New York Times News Service

WASHINGTON — A decade after the global financial crisis tipped the United States into a recession, Congress agreed on Tuesday to free thousands of small and medium-­sized banks from strict rules enacted as part of the 2010 Dodd-Frank law to prevent another meltdown.

In a rare demonstration of bipartisanship, the House voted 258-159 to approve a regulatory rollback that passed the Senate earlier this year, handing a significant victory to President Donald Trump, who has promised to “do a big number on Dodd-Frank.”

The bill stops far short of unwinding the toughened regulatory regime put in place to prevent the nation’s biggest banks from engaging in risky behavior but represents a substantial watering down of Obama-era rules governing a large swath of the banking system. The legislation will leave fewer than 10 big banks in the United States subject to stricter federal oversight, freeing thousands of banks with less than $250 billion in assets from a post-crisis crackdown that they have long complained is too onerous.

“The House just voted to free our economy from over-regulation,” Paul D. Ryan, the House speaker, R-Wis., said in a tweet. “Main Street banks are engines of growth, and now it will be easier for these banks to lend to #SmallBiz and families.”

The push to alter even a portion of Dodd-Frank so soon after the crisis and just ahead of the midterm elections has pitted Democratic lawmakers against one another. Party leaders are eager to present a united front to voters in November 2018 and are wary of losing a signature issue — holding Wall Street accountable.

“It’s a bad bill under the guise of helping community banks,” Rep. Nancy Pelosi of California, the Democratic minority leader, said during debate on the House floor Tuesday.

“The bill would take us back to the days when unchecked recklessness on Wall Street ignited an historic financial meltdown.”

Once the bill is signed by Trump, small and medium-­sized banks will no longer be required to undergo “stress tests” aimed at measuring their ability to withstand a severe economic downturn. The legislation also offers a reprieve to big — but not behemoth — banks, allowing large institutions like American Express to no longer be deemed “systemically important” and subject to stricter oversight.