Donald Trump has condemned Democrats and "a few Republicans" over the failure of his effort to deliver a new health care law, and insisted: "We will return."
An early morning tweet from the president said: "Most Republicans were loyal, terrific & worked really hard. We were let down by all of the Democrats and a few Republicans."
He added: "As I have always said, let ObamaCare fail and then come together and do a great healthcare plan. Stay tuned!"
Two Republican senators - Utah's Mike Lee and Jerry Moran of Kansas - sealed the bill's doom late on Monday when they announced they would vote "no".
At least four of the 52 Republican senators were ready to block the measure - two more than majority leader Mitch McConnell had to spare.
"Regretfully, it is now apparent that the effort to repeal and immediately replace the failure of Obamacare will not be successful," Mr McConnell said in a late evening statement that essentially waved a white flag.
It was the second stinging setback on the issue in three weeks for Mr McConnell, whose reputation as a legislative mastermind has been marred as he has failed to unite his chamber's Republicans behind a health overhaul that highlighted divisions between conservatives and moderates.
In late June, he abandoned an initial package after he lacked enough Republican support to pass.
The episode has also been jarring for Mr Trump, whose intermittent lobbying and nebulous, often contradictory descriptions of what he wanted have shown he has limited clout with senators.
Mr McConnell said the Senate will vote on a measure the Republican-run Congress approved in 2015, only to be vetoed by Barack Obama - a bill repealing much of Mr Obama's statute, with a two-year delay designed to give legislators time to enact a replacement.
Mr Trump embraced that idea last month after an initial version of Mr McConnell's bill collapsed under Republican divisions, and did so again late on Monday.
"Republicans should just REPEAL failing ObamaCare now & work on a new Healthcare Plan that will start from a clean slate. Dems will join in!" Trump tweeted.
But the prospects for approving a clean repeal bill followed by work on replacement legislation, even with Mr Trump ready to sign it, seemed shaky.
The president and party leaders started the year embracing that strategy, only to abandon it when it seemed incapable of passing Congress, with many Republicans worried it would cause insurance market and political chaos because of uncertainty that they would approve substitute legislation.
Mr McConnell's failed bill would have left 22 million uninsured by 2026, according to the non-partisan Congressional Budget Office, a number that many Republicans found unpalatable.
But the vetoed 2015 measure would be even worse, the budget office said last January, producing 32 million additional uninsured people by 2026 - figures that seemed likely to drive a stake into that bill's prospects for passing Congress.
That would seem to leave Mr McConnell with an option he described last month - negotiating with Senate minority leader Chuck Schumer. That would probably be on a narrower package aimed more at keeping insurers in difficult marketplaces they are either abandoning or imposing rapidly growing premiums.