WASHINGTON (Reuters) - U.S. Senate Republican leaders postponed a vote on a healthcare overhaul on Tuesday after resistance from members of their own party, and President Donald Trump summoned Republican senators to the White House to urge them to break the impasse.

The delay put the future of a longtime top Republican priority in doubt amid concerns about the Senate bill from both moderate and conservative Republicans. With Democrats united in their opposition, Republicans can afford to lose only two votes among their own ranks in the Senate.

Senate Majority Leader Mitch McConnell had been pushing for a vote ahead of the July 4 recess that starts at the end of the week. The legislation would repeal major elements of Obamacare and shrink the Medicaid government healthcare program for the poor.

“We’re going to press on,” McConnell said after announcing the delay, adding that leaders would keep working to make senators “comfortable” with the bill. “We’re optimistic we’re going to get to a result that is better than the status quo.”

At the White House meeting with most of the 52 Republican senators, Trump said it was vital to reach agreement on the Senate healthcare measure because Obamacare was “melting down.”

“So we’re going to talk and we’re going to see what we can do. We’re getting very close,” Trump told the senators. But he added, “If we don’t get it done, it’s just going to be something that we’re not going to like, and that’s okay.”

McConnell, whose party has a razor-thin majority in the 100-member Senate, told reporters that Republican leaders would work through the week to win over the 50 senators needed to pass the bill, with a vote planned after the recess. Vice President Mike Pence could provide the crucial vote needed to break a tie.

“I think we can get 50 votes to yes by the end of the week,” Republican Senator Roger Wicker said after the White House meeting.

REPUBLICAN OPPOSITION GROWS

The House of Representatives last month passed its own version of a healthcare bill, but the Senate bill has been criticized from both the left and the right. Moderate Republicans worried millions of people would lose their insurance. Conservatives said the bill does not do enough to erase Obamacare.

The bill’s prospects were not helped by a Congressional Budget Office analysis on Monday saying it would cause 22 million Americans to lose insurance over the next decade, although it would reduce the federal deficit by $321 billion over that period.

The report prompted Senator Susan Collins, a Republican moderate, to say she could not support the bill as it stands. At least four conservative Republican senators said they were still opposed after the CBO analysis.

Three more Republicans, Rob Portman of Ohio, Jerry Moran of Kansas and Shelley Moore Capito of West Virginia, said after the delay was announced that they oppose the current draft.

Slideshow ( 13 images )

Portman and Capito cited the bill’s Medicaid cutbacks and how that would hurt efforts to combat the opioid epidemic that has taken a heavy toll in their states. The Medicaid program was expanded under former President Barack Obama’s signature healthcare law.

“I think giving time to digest is a good thing,” Republican Senator Bob Corker said after the delay was announced.

“UNCERTAINTY” ON WALL STREET

Slideshow ( 13 images )

U.S. stock prices fell, as the decision to postpone the vote added to investor worries about Trump’s ability to deliver on his promises of tax reform and deregulation, as well as changes to the health sector. Those expected changes have driven a rally in U.S. stocks this year.

The benchmark S&P 500 index closed down 0.8 percent, and the Dow Jones industrial average finished down 0.46 percent.

“The market likes certainty and now there’s 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.

Passing the measure would be a win for Trump as he seeks to shift attention after weeks of questions over Russia’s role in last year’s U.S. presidential election.

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. Republicans worry a failure to deliver will cost them votes in next year’s congressional elections.

If the Senate passes a healthcare bill, it will either have to be approved by the House or the two chambers would reconcile the differences in a conference committee. Otherwise, the House could pass a new version and send it back to the Senate.

Lawmakers are expected to leave town by Friday for their July 4 holiday break, which runs all next week. The Senate returns to work on July 10, the House on July 11. Lawmakers then have three weeks in session before their month-long August recess.

(This story corrects Dow Jones industrial average’s percent loss in 16th paragraph.)