US President Donald Trump has declared that he is going to "let Obamacare fail" after the Republicans' effort to rewrite the 2010 healthcare overhaul imploded in Congress.

Senate Majority Leader Mitch McConnell proposed a vote on a back-up plan simply repealing the statute, but desertions by his own party seemed to ensure that would fail, too.

Republican Senators Susan Collins of Maine, Shelley Moore Capito of West Virginia and Lisa Murkowski of Alaska said they opposed McConnell's Plan B.

That is enough to spell defeat and could send a message to conservative Republicans that it is time to abandon efforts to tear down Barack Obama's law.

All Senate Democrats are opposed to the GOP changes.

Yesterday morning, Trump tweeted a barrage of criticism over his party's failure on its flagship legislative priority.

For seven years, the GOP has pledged to repeal Obama's law.

"Most Republicans were loyal, terrific & worked really hard," Trump tweeted.

"We were let down by all of the Democrats and a few Republicans."

Later, the president went further, describing a legislative tactic and political outcome that contradicts the views of many in the GOP.

"I'm not going to own it," he said as he opened a White House event with military officers.

"I can tell you that the Republicans are not going to own it.

"We'll let Obamacare fail and then the Democrats are going to come to us and they're going to say 'how do we fix it?'"

Many Republicans worry that the public already views healthcare as their responsibility, since they control the White House and both houses of Congress.

Trump has talked before about discontinuing federal payments to insurers that have let the companies subsidise out-of-pockets costs for millions of low-earning customers.

Insurers say the threat of such disruption has already encouraged them to leave some markets and seek higher premiums.

Two GOP senators – Utah's Mike Lee and Jerry Moran of Kansas – sealed the doom of McConnell's bill replacing much of Obama's law late on Monday when they announced they would vote "no" in an initial, critical vote that had been expected as soon as next week.

That meant that at least four of the 52 GOP senators were ready to block the measure – two more than McConnell had to spare in the face of unanimous Democratic opposition.

On the Senate floor yesterday, McConnell conceded that the legislation repealing the 2010 law and replacing it with GOP-preferred programmes "will not be successful", essentially waving a white flag.

He said instead, the Senate would vote on legislation dismantling much of Obama's statute that would take effect in two years, which Republicans say would give Congress time to approve replacement legislation.

However, such legislation seems unlikely to be approved, with many Republicans concerned the two-year gap would roil insurance markets and produce a political backlash against the GOP.

Moderate Republican Senator Capito said she would oppose scuttling Obama's statute "without a replacement plan that addresses my concerns and the needs of West Virginians".

She has criticised the GOP bill's cuts in Medicaid, the health insurance programme for low-income people that her state relies on heavily.

Another moderate, Collins, also said she would oppose McConnell's measure.

She said repealing the law without an immediate replacement would produce "great anxiety for individuals" who benefit from Obama's statute and "cause the insurance markets to go into turmoil".

Alaska has extremely high medical costs because many residents live in remote areas, and it also benefits from Obama's expansion of Medicaid coverage.

Murkowski has been wary of anything that would jeopardise federal funds for her state.

The three women are helping sink a McConnell repeal effort that initially saw him appoint an all-male group of senators to try crafting an overhaul bill.

McConnell opened those closed-door meetings to all GOP senators after the women complained.

This is the second stinging setback on the issue in three weeks for McConnell, whose reputation as a legislative mastermind has been marred as he has failed to unite his chamber's Republicans behind a health overhaul package that highlighted jagged divides between conservatives and moderates.

In late June, he abandoned an initial package after he lacked enough GOP support to pass.

The episode has also been jarring for Trump, whose intermittent lobbying and nebulous, often contradictory descriptions of what he wants have shown he has limited clout with senators.