House Republicans cleared the first major hurdle for tax reform Thursday by passing legislation that would overhaul the tax code for the first time in decades, and lower rates for individuals, corporations, and small businesses.

“For the first time in 31 years, we are wiping the tax code clean and replacing it with one that is fairer and simpler for everyone,” Rep. Devin Nunes, R-Calif., a member of the Ways and Means Committee who helped write the GOP plan, said.

The House passed the bill in a 227-205 vote in which 13 Republicans voted against it. The GOP could have lost up to 22 members and still passed the bill.

The vote puts real pressure on the Senate to pass its own version of the bill, so the House and Senate can sort out their differences in a conference.

But the Senate bill was in trouble this week. Three Republican senators have warned they might oppose the Senate version, which is enough to kill it if every Democrat votes against it, as expected.

Sen. Ron Johnson, R-Wis., said he cannot support it. And Sens. Susan Collins, R-Maine, and Bob Corker, R-Tenn., warned they also might not be on board.

A failure to pass legislation in the Senate would be the upper chamber's second major failure this year. The Senate fell one vote shy of passing a bill to overhaul Obamacare, which forced Republicans to shelve the idea, to the dismay of President Trump and many conservatives.

One idea being discussed in the Senate is to use the tax bill to repeal the Obamacare insurance mandate penalty for individuals. But some House Republicans warned that idea would reduce GOP support for the overall bill in the House.

In the meantime, however, House Republicans reveled in their win and were mostly unified in support of the bill that would cut the corporate tax rate from 35 percent to 20 percent and collapse seven individual tax brackets to just three.

They passed it after a pep talk in the Capitol basement from President Trump, who urged them to approve the measure. But that meeting was less of a gut check and much more of a celebration, as House passage wasn't in any doubt.

“I think this was just a thank you, and he wanted to give us an update on his Asia trip," said Rep. Mimi Walters, R-Calif.

The contents of the bill are expected to change, however. The Senate is in the process of writing its own tax bill, which lawmakers will vote on after the Thanksgiving recess, GOP leaders said. If that can pass, a House-Senate conference would meet to sort out the differences.

“At this point, this is a work in progress,” said House Speaker Paul Ryan, R-Wis.

House Republican leaders on Thursday touted their bill as one that would boost the middle class. A family of four earning $59,000 annually would receive a tax cut of nearly $1,200, they calculated.

“It truly is a tax cut for working families,” said Rep. Patrick McHenry, R-N.C., the House GOP’s chief deputy whip.

Corporations and many small businesses would see a tax cut that Republicans said would improve the economy, boost jobs and increase wages. The U.S. corporate rate is much higher than Canada’s 15 percent and Ireland’s 12.5 percent, for example, and that difference has driven business overseas, Republicans argued.

“On the business side, the harsh reality is that America has become an uncompetitive place to do business with the highest corporate tax rate in the developed world,” said Rep. Jim Renacci, R-Ohio. “By bringing the rate down to 20 percent, we can make America one of the most competitive countries in the world to do business.”

Republicans lost just a handful of GOP votes, the vast majority of the lawmakers from New York and New Jersey, where local taxes are higher than the rest of the nation. That opposition was due to language in the bill that would eliminate the federal deduction for state and local taxes.

House Ways and Means Committee Chairman Kevin Brady, R-Texas, during the closed-door meeting with President Trump, assured GOP lawmakers from high-tax states that the deduction could be added back in during negotiations with the Senate later on.

"I think we're still in the negotiation stage," said Rep. Dan Donovan, R-N.Y. "I spoke to chairman Brady inside and he said, 'Don't give up, we're still going to try to fix this thing for you,' so I have great hope."

Democrats voted unanimously against the Republican plan, despite earlier hopes among GOP lawmakers that bipartisan support might be possible.

Democrats opposed the elimination of popular deductions, including the one for medical expenses, and they argued the bill did not provide enough savings for the middle class while handing out a big tax reduction for wealthy corporations.

The Republican plan doubles the cap on the estate tax and phases it out, which Democrats oppose.

“It showers the wealthy and corporations with massive tax cuts and adds $1.5 trillion to our deficit,” Rep. John Yarmuth, D-Ky., said. “The top one percent get this massive payout … hardworking families get pocket change.”

Kimberly Leonard contributed to this report.