(Updates with McConnell remarks, stock market moves, Wall St analyst comment)
WASHINGTON, June 27 (Reuters) - Facing a potentially disastrous defeat by members of his own party, U.S. Senate Majority Leader Mitch McConnell decided on Tuesday to delay a vote on healthcare legislation in order to get more support from Republican senators.
President Donald Trump summoned all 52 Republican senators to the White House on Tuesday afternoon to discuss how to proceed.
McConnell had been pushing for a vote ahead of the July 4 recess that starts at the end of the week. The legislation would advance a repeal of major elements of Obamacare and replace it with a new federal healthcare program.
The delay showed McConnell and Trump have failed so far to attract enough votes amid a solid block of Democratic opposition and attacks from both moderate and conservative Republican senators.
McConnell, who has a razor-thin majority in the Senate, told reporters that Republican leaders were still working to get the 50 votes to pass the bill, adding that the White House was anxious to help write legislation that could pass the Senate.
While the House of Representatives narrowly passed a measure last month to replace Obamacare, the Senate version stalled on Tuesday as a small but potentially crippling group of senators held out.
Moderate senators worried that millions of people would lose their insurance. Conservatives said the bill does not do enough to erase Democratic former President Barack Obama's signature domestic legislation.
U.S. stock prices fell on Tuesday after the decision to postpone the vote. U.S. stocks have rallied this year on hopes for tax reform, deregulation and changes to the health sector. Markets are beginning to doubt whether the Trump administration can fulfill its promises.
By early afternoon the benchmark S&P 500 index was down 0.5 percent and the Dow Jones industrial average was off 0.2 percent.
The market likes certainty and now theres uncertainty. What is this going to look like when this gets out of the next iteration?," said Peter Costa, president of trading firm Empire Executions Inc.
The bill's prospects were not helped by an analysis by the nonpartisan Congressional Budget Office on Monday saying the measure would cause 22 million Americans to lose medical insurance over the next decade even as it reduced the federal deficit by $321 billion over the next decade.
The report prompted Senator Susan Collins, a key moderate vote, to say she could not support moving forward on the bill as it stands.
At least four conservative Republican senators said they were still opposed after the CBO analysis.
Passing the measure would hand Trump a legislative win as he seeks to shift attention after weeks of questions over Russia's role in last year's U.S. presidential election.
'ROOT AND BRANCH'
McConnell has promised since 2010 that Republicans, who view Obamacare as a costly government intrusion, would destroy the law "root and branch" if they controlled Congress and the White House. Their electoral victories in 2014 and 2016 were directly tied to that promise, they say.
Republicans worry that failure to deliver will tell voters that they are unable to govern effectively in the run-up to next year's congressional elections.
If the Senate passes a bill, it will either have to be approved by the House, which passed its own version last month, or the two chambers would reconcile their differences in a conference committee. Otherwise, the House could pass a new version and bounce it back to the Senate.
Democrats remained united in opposition, blasting the Senate bill as a tax break for the wealthy.
(Additional reporting by Yasmeen Abulateb, Amanda Becker, Eric Walsh, Susan Heavey and Tim Ahmann; Writing by Richard Cowan and Frances Kerry; Editing by Jeffrey Benkoe)