WASHINGTON — Congressional Republicans appear to have secured enough support to pass their massive tax plan into law after one critical holdout, Sen. Marco Rubio, R-Fla., signaled he would vote for it after last-minute changes.

Rubio emerged as a final challenge in a complicated political puzzle that the White House and Republican leaders have been assembling for the past two months.

They worked – often behind closed doors – to build a $1.5 trillion tax package that would impact almost every American family and business.

Republicans thought they had finished crafting the tax bill Thursday, but Rubio threatened to block the measure if more changes weren’t made to expand access to the Child Tax Credit for low and middle-income families.

Many of his colleagues were furious, but they relented and made changes overnight to expand the tax credit for millions of working families. On Friday afternoon, Rubio spokeswoman Olivia Cubas-Perez said he would vote for the bill.

Rubio, in a series of Twitter posts, called the planned expansion of the Child Tax Credit a “solid step toward broader reforms” that he planned to continue working on in the months and years to come.

Americans will lose the personal exemptions that often dictate how much money is withheld from their paychecks. They will instead pay taxes through a new regime that exempts a higher level of income from taxation and then subjects much of the rest to lower tax rates. Many more Americans will have access to the expanded Child Tax Credit, but they will also lose the ability to deduct large amounts of state income and local property taxes. On net, Republicans believe the changes will lower most people’s taxes. But there will be many Americans who see their taxes go up, particularly those in high-tax states like New York, New Jersey and California.

The House and Senate plan to vote on the tax bill next week, clearing the way for President Donald Trump to sign it into law. Many of its changes – lower tax rates and fewer deductions – will go into effect in January, though it will likely take some time for the economy to adjust.

The package has sweeping political and economic changes, and the ramifications might not be fully known for years.

It would represent Trump’s first major legislative victory and includes both an overhaul of the tax code and a targeted change to the Affordable Care Act, which Republicans have long sought to dismantle.

The tax plan has enormous benefits for many businesses, with a permanent and sharp reduction in tax rates that Republicans believe will trigger more economic growth and lead to higher wages.

It also changes the tax system for American households, temporarily lowering rates and creating new limits on deductions that are expected to lower the taxes of most Americans but could still lead millions to owe the government more.

The plan will also add at least $1 trillion to the debt over 10 years, based on numerous economic forecasts, an issue that will likely intensify policy debate in Washington into 2018.

The bill was originally pitched as a sweeping tax cut for the middle class, but it changed over the course of several months as Republicans demanded a variety of changes.

Sen. Ron Johnson, R-Wis., extracted more tax cuts for businesses whose owners file their taxes through the individual income tax code.

Sen. Susan Collins, R-Maine, and East Coast Republicans demanded changes that allow Americans to deduct up to $10,000 state and local taxes.

House Republicans tried to cap the mortgage-interest deduction to interest paid on up to $500,000 in new home loans, but they acquiesced eventually to a $750,000 cap.

A number of Republican donors complained that the bill could push their taxes up, so Republicans agreed to a late change that lowers the top tax rate to 37 percent.

For many Americans, the tax bill could have an immediate impact.

It could alter the tax benefit of mortgages issued in just two weeks, and Americans could see more take-home pay in their paychecks by February.

The process of filing taxes each year will change, however, and could lead Americans to change how they allocate money. It could also lead companies to restructure, based on their income, investment and spending patterns.

Many of the changes made late in the negotiations benefited businesses and the wealthy, but Rubio’s late-stage demands pulled the package back a bit more toward its working-class roots.

Republicans had proposed to expand the Child Tax Credit from $1,000 to $2,000, but the benefits formula they’d planned to use would have capped the credit for many low and moderate-income families at $1,100. Rubio demanded the credit be raised, and Republicans at first believed he would balk, in part because he voted for the Senate bill even after the party rebuffed his effort to expand the Child Tax Credit in that measure.

But when he threatened Thursday to block the bill and appeared to have the backing of Sen. Mike Lee, R-Utah, Republican leaders agreed to make changes and expand the tax credit up to $1,400 for those families.

Republicans had only passed an earlier version of the bill through the Senate with a 51-49 vote, and losing two more members could have proven fatal. Rubio’s support appeared to give them the margin of victory they needed to enact it into law.

Democrats have blasted the tax plan, accusing it of showering corporations with lower taxes at the expense of driving up the debt and giving only temporary and uneven benefits to the middle class. Public opinion polls show many Americans share this view, but Republicans have persisted, with many believing it will lead to a surge in economic growth and buoy their prospects going into the 2018 midterm elections.

The Washington Post’s Heather Long contributed to this report.