(CNN) President Donald Trump pledged on the campaign trail to "do a big number" on the Dodd-Frank Act.

And now a Republican bill that offers the most sweeping changes to rules crafted following the 2008 financial crisis is headed to his desk for his signature.

In a final step Tuesday, the House voted 258-159 in favor of a bipartisan Senate-crafted bill aimed at loosening regulations for thousands of community banks and regional lenders, including State Street, BB&T and SunTrust.

"For far too long, far too many people in our country have struggled to make ends meet," Rep. Jeb Hensarling, chairman of the House Financial Services Committee, said in a statement. "They've struggled to buy a car; they've struggled to buy a home; they've struggled for their version of the American dream. But today, that changes."

The bill's passage marks the end of years of lobbying by the financial industry to soften post-crisis rules and tense negotiations in Congress to win bipartisan support for the bill.

The President is expected to sign the legislation before Memorial Day, according to a senior White House official.

Senate Banking Chairman Mike Crapo, an Idaho Republican who spearheaded the legislative effort with the help of more than a dozen Democrats, said the bill's passage was an important moment for small banks, businesses and American families.

"This step toward right-sizing regulation will allow local banks and credit unions to focus more on lending, in turn propelling economic growth and creating jobs on Main Street and in our communities," said Crapo in a statement.

Two top administration officials -- Treasury Secretary Steven Mnuchin and Joseph Otting, comptroller of the currency -- lauded the legislation, saying it aligns with recommendations made by the administration and would appropriately tailor regulations to improve access to credit from smaller banks.

But not all welcomed the advancement of the bipartisan measure.

"It's hard to watch Congress ignore the painful lessons of the Great Recession that started with a historic financial collapse that occurred less than 10 years ago," said Mike Litt, consumer campaign director at US PIRG, a nonprofit, nonpartisan advocacy organization. "The warning signs are plain to see."

Democrats who supported the bill have drawn backlash from more progressive members of the party, who argue that a regulatory rollback would make the financial system more vulnerable to another crisis.

Massachusetts Democratic Sen. Elizabeth Warren, who opposed the bill, wrote on Twitter after it passed the Senate in March that "bankers are popping champagne."

Ahead of the House vote, House Democratic leader Nancy Pelosi of California and California's Rep. Maxine Waters, the top Democrat on the House Financial Services Committee, urged their colleagues not to vote in favor of the bill.

"We must not allow the GOP Congress to drag us back to the same oversight that ignited the Great Recession," they wrote to Democratic colleagues this week.

Virginia Democratic Sen. Mark Warner, a member of the banking panel, said the bill was a compromise measure that didn't include "everything Democrats wanted nor everything Republicans wanted," but would help small lenders provide mortgages and credit to Americans and small businesses in his home state and elsewhere.

House GOP leaders agreed earlier this month to proceed with a vote after striking a deal with their Senate counterparts. In exchange for bringing the measure to the floor for a House vote, Senate leaders would press ahead with a companion package of bills supported by Hensarling, a Texas Republican.

Hensarling wanted to add a number of measures to the Senate bill. One would ease disclosure requirements for banks on mortgage loans. Another would allow more companies to file confidential initial public offerings without divulging all their sensitive financial information right away.

But any changes in the House would have sent the bill back to the Senate. And moderate Senate Democrats, whose support was critical in advancing the banking legislation, had said they wouldn't vote on the bill twice.

For years, small and regional banks have claimed regulations under Dodd-Frank have hurt their ability to lend and help stimulate the economy.

"This hard-fought, long-awaited community bank regulatory relief legislation will put community banks in an enhanced position to foster local economic growth and prosperity," said Rebeca Romero Rainey, president and CEO of the Independent Community Bankers of America.

The legislation will provide smaller financial institutions with relief from the same set of strict rules as behemoth Wall Street banks. But there are fewer wins for the country's biggest banks whose failure could endanger the entire financial system if they go under. Top bank regulators agreed fixes should be made for community banks.

Among the fixes proposed was raising the threshold at which banks are considered "too big to fail." That trigger, now set at $50 billion in assets, will rise to $250 billion.

That would leave only a dozen US banks -- including JPMorgan Chase, Bank of America and Wells Fargo -- facing the strictest regulations by the Federal Reserve.

But two dozen midsize regional banks will no longer have to hold as much capital to cover losses on their balance sheets. They will not be required to have plans in place to be safely dismantled if they failed. And they will have to take the Fed's bank health test only periodically, not once a year.

The measure will also loosen regulations for mortgage lenders and change the rules for student loan defaults.

Community banks with less than $10 billion in assets will no longer have to comply with the so-called Volcker Rule . The rule bars financial institutions from making risky bets with money that is insured by taxpayers.

The reporting agencies Equifax, Experian and TransUnion will also be required to freeze and unfreeze Americans' credit reports for free. That will be a reprieve for millions of Americans whose data was exposed in the breach of Equifax, disclosed last year.