On Saturday, a triumphant Mr Trump told supporters at a New York fundraiser: “So last night we passed in the history of the country, the largest tax cuts and reform… what we’re doing is, if you look at it, we’re going to grow the country, we’re going to grow jobs. We’re going to be growing everything.”

Image copyrightAFP

Image caption
Republican majority leader Mitch McConnell overcame a pocket of Republican resistance to get the bill through

The move is as a major victory for Mr Trump, who since taking office has struggled to get major legislative movement in Congress – including fulfilling his vow to repeal and replace Obamacare.

Media captionTrump on Russia inquiry: “What has been shown is no collusion”

How did we get here?

Analysis: Anthony Zurcher, BBC News, Washington

The US Senate, a seemingly insurmountable roadblock for the Republican agenda for much of this year, has at last given its assent to a major piece of legislation.

Perhaps unsurprisingly it was sweeping tax cuts – always beloved by conservatives – that finally brought the party together and gave President Donald Trump the opportunity to claim a landmark legislative achievement.

It wasn’t always pretty. Senate negotiators were handwriting amendments to the massive bill practically up until the final votes were taken. Deals within deals were cut to satisfy recalcitrant legislators. Democrats howled at the permanent cuts provided to corporations, while middle-class taxpayer benefits had sunset clauses.

In the end, however, a combination of hope and fear were enough to drag a slim majority into the yes column. The hope is that a booming economy will give Republicans a chance to run on their tax policy when they stand before voters next November. The fear was that yet another failure would have led to a revolt among the party’s big donors and traditional business constituencies.

The House and Senate must now smooth out differences in their bills and vote on the compromise. It’s not the end of the race, but the finish line is in sight.

What’s in the new tax bill?

Presiding over the Senate, Vice-President Mike Pence declared the 51-49 victory to applause from Republicans in the early hours of Saturday morning.

The final draft of the bill went through several changes in order to bring reluctant Republicans on board. Republicans have a 52-48 majority in the Senate.

Under the Tax Cuts and Jobs Act, the corporate tax rate would be permanently lowered from 35% to 20%, while future foreign profits of US-based firms would be mainly exempt from tax.

Image copyrightGetty Images

Image caption
President Trump said the new code would be so simple that taxes could be filed on a postcard

The measures were passed despite the non-partisan Senate Joint Committee on Taxation warning on Thursday that the bill would add significantly to the federal deficit over a decade.

The committee’s findings contradicted a White House claim that economic growth would compensate for the tax cuts.

Most Americans across all income levels would see modest tax breaks until 2026 and the committee said after that families earning under $75,000 a year would likely face higher taxes.

Some opponents highlighted a measure that would end a requirement introduced under Obamacare for most taxpayers to buy health insurance or face a fine. According to the non-partisan Congressional Budget Office, scrapping the mandate would push up insurance premiums and lead to 13 million people losing cover by 2027.

There were some last minute changes, including a $10,000 property tax deduction as requested by Senator Susan Collins, one of the Republicans who had been reluctant to back the bill.

How did senators react?

After the vote, Senate Democratic leader Chuck Schumer said his opponents would pay the price at the ballot box in mid-term elections next year.

“My Republican friends will ultimately pay consequences for this bill in 2018 and beyond. The Republican party will never again be the party of tax cuts for middle-class people,” he warned.

He said the measures would endanger social security and medical provision.

Independent Senator Bernie Sanders was among the most vocal critics, declaring during the debate that the American treasury was “being looted”.

Image copyrightGetty Images

Image caption
Bernie Sanders said the bill would benefit the wealthiest people and largest corporations

But Republican Senate majority leader Mitch McConnell, who succeeded in bringing dissenting party members into line, said the legislation would prove to be “just what the country needs to get growing again”.

He brushed aside complaints that it was pushed through without proper scrutiny, saying: “Everybody had plenty of opportunity to see the measure. You complain about process when you’re losing and that’s what you heard on the floor tonight.”

Republican Senator Bill Cassidy also praised the bill, saying “working families and middle-income families across the nation will be better off”.

We are one step closer to delivering MASSIVE tax cuts for working families across America. Special thanks to @SenateMajLdr Mitch McConnell and Chairman @SenOrrinHatch for shepherding our bill through the Senate. Look forward to signing a final bill before Christmas! pic.twitter.com/gmWTny3SfS