President Donald Trump welcomed Saturday a landmark tax cut bill passed by the Senate -- a step toward a big win overshadowed by an ominous turn for him in the probe into Russian meddling in the US election.

Trump also insisted, again, that there was no collusion between his campaign and Russia.

In an early morning Twitter post, Trump called the bill the biggest tax cut in US history and said his Republican Party would now work with the House of Representatives, which has passed its own tax bill, to produce a common version.

Passage would mark a first major victory for Trump 's sputtering legislative agenda.

"Thank you to House and Senate Republicans for your hard work and commitment!" Trump wrote.

After a marathon session that stretched into the night, the chamber voted 51 to 49 in favor of the biggest US tax overhaul in 31 years.

Both the Senate and House versions lower the corporate tax rate to 20 percent from 35 percent, and include more modest tax cuts aimed at individuals across all income levels.

Democrats argue that the plan is too expensive and will accommodate only the rich, and that it could ultimately impact cherished US entitlement programs like Medicare.

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.

Trump hopes to sign a final bill before Christmas. That would be a sweet victory for the president, who has delivered on hardly any of his major campaign promises, including repealing the health care law known as Obamacare.

The Senate passage came after a particularly bad week.

His former national security advisor, Michael Flynn, pleaded guilty Friday to lying to the FBI about contacts he had with the Russian ambassador, at the instance of top Trump officials.

The 58-year-old retired three-star Army general is the most senior figure indicted in special prosecutor Robert Mueller's sprawling investigation into Russian interference in last year's election.

And in an ominous turn for Trump , Flynn also pledged to cooperate with Mueller, whose focus goes beyond possible collusion with Russia to shady business dealings and whether Trump himself tried to thwart the investigation.

As he left the White House Saturday for a day trip to New York, Trump insisted he had nothing to worry about.

"What has been shown is no collusion. There's been absolutely no collusion. So we're very happy," Trump told reporters.

Trump said he was not worried by what Flynn might tell Mueller, in his first public comments on the matter.

Also this week, Trump engaged in an extraordinary, testy cross-Atlantic spat triggered by his retweeting of anti-Muslim videos posted by extremist far-right group in Britain.

That prompted widespread outrage at home and abroad, and prompted British Prime Minister Theresa May to say that what Trump did was "wrong."

Trump in turn answered by essentially telling May to focus on her own country and the threat of Islamist terror and not focus on him.

Back home, the Senate tax bill almost did not make it, amid objections from lawmakers from holdout Republican lawmakers.

Tax writers tweaked the 479-page measure deep into the night, leaving Democrats furious over the last-minute, handwritten changes to the legislation.

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.

- Holdouts relent -

As the final vote was tallied, grinning Republicans congratulated one another with handshakes, backslaps and hugs.

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.