WASHINGTON — Republican lawmakers on Thursday took an important step toward the biggest tax code overhaul since the 1980s as the House of Representatives approved a broad package of tax cuts sought by President Donald Trump.

The House vote shifted the tax debate to the Senate, where that chamber’s own plan was being debated into Thursday evening. That measure has already encountered resistance from some within the Republicans ranks. No decisive Senate action is expected until after next week’s Thanksgiving holiday.

Four Republican senators — enough to derail the legislation — have been talking privately about opposing the bill because it would balloon the federal deficit, according to a Time magazine report.

Trump, who is looking for his first major legislative win since he took office in January, went to the Capitol just before the vote to urge House Republicans to pass the tax bill, which Democrats call a give-away to the wealthy and businesses.

“A simple, fair and competitive tax code will be rocket fuel for our economy, and it’s within our reach. Now is the time to deliver,” White House spokeswoman Sarah Sanders said after the largely party-line House vote of 227-205.

Congress has not thoroughly overhauled the sprawling tax code since Republican Ronald Reagan was president. The House measure is not as comprehensive as Reagan’s 1986 sweeping package, but it is more ambitious than anything since then.

But the path forward for the tax plan in the Senate, where Republicans have a narrow majority, is fraught with obstacles about concerns over the federal deficit, health care and the distribution of tax benefits. Republicans can lose no more than two Senate votes if Democrats remain united in opposition.

Senate Republican tax writers made the risky decision to tie their plan to a repeal of the requirement for people to get health care insurance under former President Barack Obama’s Affordable Care Act. That exposed the tax initiative to the same political forces that wrecked Republicans’ anti-Obamacare push earlier this year.

The House bill, which is estimated to increase the federal deficit by nearly $1.5 trillion over 10 years, would consolidate individual and family tax brackets to four from seven and reduce the corporate tax rate from 35 percent to 20 percent.

It also would scale back or end some popular tax deductions, including one for state and local income taxes, while preserving a capped deduction for property tax payments.

Democrats have pointed to analyses showing millions of Americans could end up with a tax hike because of the elimination of popular deductions. Repealing or cutting some deductions is a way to offset the revenue lost from tax cuts.

“It’s a shameful piece of legislation, and the Republicans should know better,” House Democratic leader Nancy Pelosi of California told lawmakers before the vote.

U.S. Rep. Chellie Pingree of Maine’s 1st District, who said Tuesday she would vote against the bill because it favored the rich and corporations, issued a statement saying she supports tax reform that helps small businesses and working families, but the House bill is not that kind of plan.

“For the wealthiest of the wealthy, the tax cuts under this bill get bigger and bigger every year, while they get smaller and smaller for everyone else. At the end of 10 years, many middle-class Mainers will actually be paying more in taxes,” she said. “And for some, the harmful impacts will come immediately, in the form of repealing important deductions that offer relief to graduates, teachers, those with high medical expenses and many others.”

She added that the tax cuts in the bill adding $1.5 trillion to the national debt over 10 years under sequestration would automatically trigger $25 billion in cuts to Medicare.

U.S. Rep. Bruce Poliquin, who represents Maine’s 2nd District, said earlier this week that he would vote for the legislation. He issued a statement reiterating his stance on keeping the highest tax rate for those earning $1 million and more and helping small businesses, but said the bill is not perfect.

“There are portions of it that I do not agree with, such as eliminating the medical expense deduction. I am encouraged that the current Senate bill does not include the elimination of the medical expense deduction, and I look forward to continuing these discussions on the details of tax reform as Congress moves toward finalizing legislation,” he said.

Thirteen House Republicans opposed the bill, all but one from New York, New Jersey and California — states with high taxes where residents would feel the pinch from eliminating the deduction for state and local income taxes.

“This fight is not over. I look forward to continuing negotiations to improve this proposal for my constituents,” said Republican U.S. Rep. Lee Zeldin of New York, who opposed the bill.

Investors have cheered the prospect of a tax overhaul and U.S. stocks rose and the dollar edged higher against a basket of major currencies on Thursday after the House passed its bill.

Brian Battle, director of trading at Performance Trust Capital Partners in Chicago, said stocks’ strong gains on the day were helped by the House vote.

“It’s helping stocks now and the bond market’s turned around,” he said. “The tax plan isn’t a foregone conclusion but it passed the lowest hurdle in the House. The even higher hurdle is to have something pass in the Senate.”

Republicans have long promised tax cuts and see enacting the legislation as critical to their prospects of retaining power in Washington in the November 2018 congressional elections, particularly after failing to meet their promise to repeal Obamacare.

But it will be a challenge in the 100-seat Senate, where Republicans can lose no more than two votes from their 52-48 majority if they hope to enact tax reform.

The Senate version has already faced criticism from several Republican lawmakers, including U.S. Sen. Susan Collins of Maine, who helped sink the Republican effort to repeal Obamacare.

Republican U.S. Sen. Ron Johnson of Wisconsin said Trump called him Wednesday after Johnson announced his opposition to the current Senate plan because of what he said were unequal rates for small businesses and noncorporate enterprises known as “pass-throughs,” versus corporations.

Still, Johnson said he was hopeful a final bill could be passed by year’s end. He said he had gotten “total cooperation” from the White House, and they were interested in fixing the problem.

“All this stuff moves pretty fast, which I’m not wild about. I’d rather take a little bit more time,” Johnson told reporters.

U.S. Sen. John McCain of Arizona, a Republican who also voted against the health care overhaul effort this summer, and his colleagues Bob Corker of Tennessee and Lisa Murkowski of Alaska, are considered critical votes along with Collins and Johnson.

Nonpartisan congressional analysts say the provision to repeal the health insurance mandate in the Senate version would drive up premium costs and cause some 13 million Americans to lose coverage.

The Senate plan also sets individual tax rate cuts to expire while reductions for corporations are permanent.

The House and Senate versions will eventually have to be reconciled before they can be sent to Trump’s desk for his signature, but Republican U.S. Rep. Tom Cole of Oklahoma said that should not be a problem.

“There’s no issue here that can’t be ironed out and settled between us,” Cole told reporters.

The Senate Finance Committee was voting on amendments to the Senate Republican tax bill on Thursday as congressional leaders race toward an informal end-of-year deadline for the tax plan.

Senate Democratic leader Chuck Schumer of New York warned Republicans that by increasing the federal deficit, the tax bill would imperil other important priorities like military spending.

“Any defense hawk should be wary of this bill,” he said.

The Bangor Daily News contributed to this report.

Follow the Bangor Daily News on Facebook for the latest Maine news.