The US Senate has approved the most sweeping overhaul of the US tax system in more than three decades.
The House of Representatives earlier approved the bill comfortably. Republicans have majorities in both houses of Congress.
For final approval the legislation must go back to the House on Wednesday for a procedural issue.
If it passes, as expected, it will be President Donald Trump's first major legislative triumph.
Critics say the package is a deficit-bloating giveaway to the super-rich.
But Republicans argue the tax cuts for corporations, small businesses and individuals will boost economic growth.
Vice-President Mike Pence presided over the vote and announced the result.
"On this vote the ayes are 51, the nays are 48. The Tax Cuts and Jobs Act is passed," he said.
Shortly before the final tally was announced, protesters in the Senate's public gallery shouted, "Kill the bill." They were escorted out.
It wasn't easy, but in one fell legislative swoop, Republicans have achieved some long-sought political goals.
Subject to a vote in the House early on Wednesday, they have reduced taxes by more than $US1.4 trillion ($NZ2tn) over 10 years, including significant changes to the corporate tax structure.
Congressional conservatives also opened the Arctic National Wildlife Refuge to oil drilling - a pitched partisan battle for years. And it set a bomb at the heart of Obamacare by ending the tax penalty for those who don't have medical insurance starting in 2019.
Democrat leader Chuck Schumer warned Republicans that they would pay a price for the "awful legislation" in next year's mid-term elections.
"The substance and polling are so rotten that a year from now Republicans will be running from this bill in shame for voting yes this evening," he said.
Earlier, 12 Republicans and all Democratic members of the House of Representatives opposed the bill but it passed by 227 votes to 203, to loud cheers and applause from Republicans in the chamber.
Speaker Paul Ryan said: "Today we are giving the people of this country their money back. This is their money after all!"
Due to a procedural glitch, the House will have to vote again on Wednesday morning before the bill can be signed into law by President Trump.
The bill permanently cuts the tax rate for corporations from 35 percent to 21 percent and also lowers individual tax rates, albeit temporarily.
However, the non-partisan Joint Committee on Taxation says the legislation will add as much as $US1.4tn to the $US20tn national debt over 10 years.