US Senate Republicans narrowly passed landmark tax reform early Saturday, a critical step toward delivering a monumental legislative victory for President Donald Trump in his first year in office.
After a marathon session that stretched overnight, the chamber voted 51 to 49 in favour of the nation's largest tax overhaul in 31 years, overcoming stubborn internal Republican resistance and dismissing Democrats angry over last-minute revisions to the bill.
The Senate version and the one passed recently by the House of Representatives must now be reconciled into a single bill, and approved again by both chambers, before it can be signed into law.
Both versions dramatically lower the corporate tax rate from 35 percent to 20 percent, and include more modest tax cuts aimed at individuals across all income levels.
The Senate vote amounts to a reversal of fortune for Trump and Republican leaders, whose bill just 24 hours earlier was on the brink of collapse when a handful of Republican deficit hawks balked at the controversial plan's $1.5 trillion price tag for 10 years.
Eager to claim victory on what may be one of the best days of his presidency so far, Trump tweeted: "We are one step closer to delivering MASSIVE tax cuts for working families across America."
"Look forward to signing a final bill before Christmas!" he added.
After extensive negotiations, the bill was salvaged. Tax writers tweaked the 479-page measure deep into the night, leaving Democrats furious over the last-minute, handwritten changes to the legislation.
Trump, desperate for a congressional win, has been more active in the legislation's navigation through Congress than he was with the Obamacare repeal bill that failed earlier this year.
He has repeatedly stressed he wants the tax bill on his desk by year's end.
Democrats fumed that they received the text -- peppered with extensive handwritten modifications that earned scorn from opposition lawmakers -- only a few hours before the vote.
"We understand they have the votes to pass their bill despite a process -- and a product -- that no one can be proud of and everyone should be ashamed of," top Senate Democrat Chuck Schumer told colleagues.
Haste and the darkness of night were Trump's allies in the process, Schumer said.
As the final vote was tallied, grinning Republicans congratulated one another with handshakes, backslaps and hugs.
A trio of Democrats including Senator Ron Wyden, a ferocious opponent of the bill, stood motionless in the back of the chamber.
Mindful of the historic nature of the vote, Vice President Mike Pence presided over the chamber during final passage.
Several Republicans who had voiced concerns about the bill were ultimately lured by McConnell's agreement to make changes.
Senators Bob Corker and Jeff Flake, a pair of Trump critics, worried about the impact of the tax cuts on the country's massive deficit.
A nonpartisan congressional tax scorekeeper had projected the tax overhaul would add $1 trillion to the deficit, even after accounting for expected economic growth from the plan.
The analysis complicated Trump's argument that the tax cuts would pay for themselves through additional economic growth.
Flake eventually agreed to back the legislation, after receiving assurances from the White House that action would be taken to shield thousands of young "Dreamer" immigrants from deportation.
Corker hoped to offset the cost of the tax cuts by including a rise in the corporate tax rate in later years, but the effort failed.
He was the lone Republican no vote on the bill, but his opposition was not enough to derail it.
Lawmakers said a deal was reached to raise tax deductions for certain small businesses, a move that got two more wavering senators on board.
As an offset, the bill's tax rate for US corporations repatriating profits from abroad would rise, from 10 percent to possibly 14 percent.
"It's like the Rubik's Cube trying to fit everybody's concerns in. But I think we've ended up with a better bill," Senator Rob Portman said.
Republicans hold a narrow 52-48 Senate majority. With all Democrats opposing the tax plan, just three Republican defectors would have killed it.
Senator Susan Collins had voiced deep scepticism about the bill but ultimately gave her backing after securing changes, including on healthcare and local taxes.
The Senate and the House must negotiate a compromise bill, and contentious votes are likely in the weeks ahead.
"Now, we will move quickly to a conference committee so we can get a final bill to President Trump's desk," House Speaker Paul Ryan said in a statement.
Democrats argue that the plan is too expensive and will accommodate only the rich, and that it could ultimately impact cherished US entitlement programmes like Medicare.
"The federal treasury is being looted tonight!" leftist Senator Bernie Sanders roared in the chamber.