(Adds negotiations details; Flake, Collins and investor quotes)
WASHINGTON, Nov 30 (Reuters) - A sweeping Republican-sponsored tax overhaul gained momentum in the U.S. Senate on Thursday with the backing of Senator John McCain, as party leaders held behind-the-scenes negotiations to try to secure enough votes for passage.
McCain, a key player in July's collapse of a Republican effort to dismantle Obamacare, said the tax bill was "far from perfect." But the war hero and former presidential candidate said the bill would boost the economy and give tax relief to all Americans.
Republican Senator Susan Collins, who also played a role in the failure of the Obamacare rollback, told reporters she was still not committed to backing the tax bill.
The Republican-controlled Senate was expected to begin a potentially chaotic "vote-a-rama" on amendments from Republicans and Democrats later on Thursday before moving to a final vote late in the evening or early on Friday.
Hours before the votes, senators were still wrestling over the bill's contents. Several Republican withheld support while pushing for changes, including limits on how much the bill would expand the federal deficit, inclusion of a federal deduction for up to $10,000 in state and local property taxes, and bigger tax breaks for "pass-through" companies, including small businesses.
As drafted, the Senate bill would cut the U.S. corporate tax rate to 20 percent from 35 percent after a one-year delay and reduce the tax burden on businesses and individuals, while ending many tax breaks, but would still add $1.4 trillion to a federal debt load that already surpasses $20 trillion.
Some Republicans want to set the reduced corporate tax rate at 22 percent and forgo income tax cuts for the wealthiest Americans. Republican Senator Roy Blunt told reporters the 20-percent corporate rate "won't be raised much at all."
Another possible stumbling block was Senator Bob Corker's push for a tax snap-back provision that would raise taxes automatically, possibly on corporations, if economic growth targets are not reached in the future, to offset a higher deficit.
That snap-back proposal was under attack from conservatives and lobbyists, including interest groups aligned with billionaire industrialists Charles and David Koch, who say the prospect of tax hikes could undermine future economic growth.
But optimism over a final deal was swelling and U.S. stocks extended gains after McCain said he would back the legislation.
Financial markets have rallied on hopes the measure will pass, a sentiment shared by conservative groups that hope to see the first major overhaul of the U.S. tax code since 1986, when Republican Ronald Reagan was president.
The benchmark Dow Jones industrial average of blue-chip U.S. stocks was up more than 1.25 percent at 24,240 in mid-afternoon trading on Thursday, near record levels.
The key driver today is the tax reform. We just heard Senator McCain come out and say he will be supporting the bill," said Mona Mahajan, U.S. Investment Strategist at Allianz Global Investors in New York. "People feel like there is momentum now to get this done.
President Donald Trump and his Republican allies want to enact tax cuts before January. If the Senate and House can craft a compromise bill that Trump will sign, it would give Republicans their first major legislative victory of 2017.
The House approved its own tax bill on Nov. 16.
Republicans fear that failure on the tax bill could alienate donors and jeopardize their control of the Senate and House of Representatives in the November 2018 congressional elections.
Among Americans aware of the Republican tax plan, 49 percent said they were opposed, up from 41 percent in October, according to a Nov. 23-27 Reuters/Ipsos poll released on Wednesday. The latest online poll of 1,257 adults found 29 percent supporting the plan and 22 percent saying they "don't know."
Democrats say the Republican tax plan is a giveaway to corporations and the wealthy. "Every time I turn around I hear about another sweetheart gift to a powerful interest," Democratic Senator Ron Wyden told reporters.
Republicans have a 52-48 majority in the 100-member Senate, giving them enough votes for a win if they can hold together.
"Were still working on a few things," Senator Jeff Flake, one of the uncommitted Republicans, told reporters.
With Democrats united in opposition, Republicans can afford to lose support from no more than two of their own members. Vice President Mike Pence would be able to break a 50-50 tie.
Collins, also uncommitted, said she was encouraged that Senate leaders and Trump were listening to her concerns on healthcare and deducting state and local taxes.
She told reporters Senate Republican leader Mitch McConnell had pledged the bill would not result in automatic cuts to Medicare. She also said Congress will pass a continuing resolution spending bill and that it will include two healthcare provisions she wants, before a final tax bill is passed.
(Additional reporting by David Morgan, Makini Brice, Amanda Becker, and Lewis Krauskopf in New York; Writing by John Whitesides; Editing by Kevin Drawbaugh and Nick Zieminski)