President Trump speaks before signing into law a bill that rolls back banking regulations passed in response to the 2008 financial crisis, on Thursday. (Andrew Harrer/Bloomberg News)

President Trump on Thursday signed into law a bill that rolls back banking regulations passed in response to the 2008 financial crisis, declaring it a “big deal for our country.”

The measure, which passed the House this week, leaves the central structure of the post-financial-crisis rules in place, but it makes the most significant changes to weaken the Dodd-Frank banking regulations since they were passed in 2010. It exempts some small and regional banks from the most stringent regulations and also loosens rules aimed at protecting the biggest banks from sudden collapse.

At a signing ceremony at the White House, Trump said the legislation “rolls back the crippling Dodd-Frank regulations that are crushing community banks and credit unions nationwide. They were in such trouble. One size fits all — those rules just don’t work.”

But he also suggested that the measure, which leaves the strictest federal oversight regulations in place for the biggest banks, should perhaps do more to help them, too.

“We’re going to have to start looking at that also for the larger institutions, because they also are put at a disadvantage in terms of loaning money to people wanting to open up businesses, so perhaps we’ll be taking a look at that,” Trump said.

Some changes to help Wall Street banks could happen by regulation, and federal regulators are expected to take steps later this month toward relaxing one of the most controversial aspects of Dodd-Frank, known as the Volcker Rule, which bans banks from making some risky bets.

The new law’s supporters say it provides needed relief for community and local banks struggling to extend credit as they chafe under Washington’s regulations. But critics charge it opens the financial system back up to the abuse and risky behavior that crippled the U.S. economy a decade ago — and does so at a time when financial firms are posting record profits.

The House passed the plan Tuesday, following Senate approval in March. Republicans overwhelmingly supported the bill, while Democrats remain divided. The bill passed the Senate with support from 17 members of the Democratic caucus, but it was fiercely opposed by progressives in an intraparty fight that at times turned personal.

The politics around the legislation contain potential implications for the November midterm elections. A half-dozen of the Democrats who voted for the bill are up for reelection in states Trump won, and their support for the measure could allow them to highlight their ability to work with the president in places where he remains popular.

That dynamic was on display at Thursday’s signing ceremony, where Sen. Heidi Heitkamp (N.D.), one of the most-endangered Democrats in November, took a place near Trump in the front of the pack of legislators present. The president called Heitkamp out by name to thank her, while devoting just a mention to her Republican opponent, Rep. Kevin Cramer, who stood crowded in the back of the group.

The final measure represents a compromise that leaves the overall structure of the post-financial-crisis rules in place and does not touch the Consumer Financial Protection Bureau, a watchdog agency created after the crisis.

Trump had vowed to “do a big number” on the 2010 Dodd-Frank Wall Street Reform and Consumer Protection Act, and some House Republicans had hoped to repeal the law entirely — or at least make major changes to rein in the watchdog agency.

But former congressman Barney Frank (D-Mass.) himself has said that the new law amounts to only a “little number” on his signature legislation, although Trump argued Thursday that he was keeping his commitment to “rescue these community banks from Dodd-Frank, the disaster of Dodd-Frank.”

Under the new law, banks with more than $50 billion in assets would no longer be automatically subject to the toughest federal regulations, including a yearly stress test to prove they could survive another onslaught of economic turmoil. The bill would raise that threshold to $250 billion in assets, potentially allowing several high-profile financial institutions, including American Express and Ally Financial, to escape the extra regulatory scrutiny.

By raising the asset threshold to $250 billion, the law is expected to reduce the number of banks subject to heightened regulatory scrutiny from 38 to 12. The law is further expected to unleash a rush of industry consolidation as some banks see an opportunity to get bigger without incurring additional regulatory scrutiny.

The law also exempts banks with less than $10 billion in assets from the Volcker Rule. Small banks will also be exempted from a Dodd-Frank requirement that they report more detailed data on borrowers. The industry has complained that both regulations are too cumbersome and time-consuming.

Supporters say the measure’s benefits are limited almost exclusively to small and regional banks, but critics challenge that argument, noting a Congressional Budget Office assessment that there’s about a 50 percent chance that behemoths JPMorgan and Citibank could take advantage of provisions aimed at helping smaller firms.

Banks reported $56 billion in profits during the first quarter of 2018, up 27.7 percent compared with the same period last year, the Federal Deposit Insurance Corp. said Tuesday. Both figures surpass the industry’s previous record for quarterly profits.

For the more than 5,000 community banks in the industry, profits rose 17.7 percent, to $6.1 billion, during the first quarter, according to the FDIC report.

Renae Merle contributed to this report