Media playback is unsupported on your device Media caption Trump's battles with Obamacare - in his own words

US President Donald Trump has suffered a major setback after his healthcare bill was withdrawn before a vote in Congress on Friday night.

The bill faced certain defeat from members of Mr Trump's Republican party, who control both houses of Congress.

However, Mr Trump blamed the minority Democrats for the failure.

Repealing and replacing the healthcare programme enacted by his predecessor, Barack Obama, was one of the president's major election pledges.

Republican House Speaker Paul Ryan said he and Mr Trump agreed to withdraw the vote, after it became apparent it would not get the minimum of 215 Republican votes needed.

Multiple reports suggested that between 28 and 35 Republicans were opposed to President Trump's draft American Health Care Act (AHCA).

Some were said to be unhappy that the bill cut health coverage too severely, while others felt the changes did not go far enough.

The bill also appeared unpopular with the public - in one recent poll, just 17% approved of it.

The Congressional Budget Office (CBO) estimated the AHCA would reduce the deficit by $151bn between 2017 and 2026.

However, the number of Americans without health insurance would stand at 52 million by the same time - an extra 24 million compared with Obamacare.

Speaking after the withdrawal, Mr Trump repeatedly said Obamacare would "explode", without explaining why.

However, he refrained from criticising Mr Ryan, whose job as speaker of the House involves rallying support for controversial bills.

Media playback is unsupported on your device Media caption Paul Ryan: "I won't sugar coat this. This is disappointing"

Mr Trump said: "I like Speaker Ryan. I think Paul really worked hard.''

Mr Ryan also told reporters the president had been "really been fantastic''.

How disastrous is this for Trump? Analysis by Anthony Zurcher, North America reporter

How bad was Friday's defeat of the American Health Care Act in the House of Representatives? Bad. Very bad.

The AHCA was the first major piece of legislation pushed by the White House and the Republican-controlled Congress, a key political test early in the president's term, when he should be at the height of his power and party cohesion at its strongest.

In spite of all of this, Mr Trump, Mr Ryan and the Republicans running Washington could not get the job done.

For Republicans Friday wasn't just bad. It was a disaster.

Read more analysis here.

President Trump said the Republicans would probably focus on tax reform for now.

"We have to let Obamacare go its own way for a little while," he told reporters at the Oval Office, adding that if the Democrats were "civilised and came together", the two parties could work out a "great healthcare bill".

"We learned about loyalty; we learned a lot about the vote-getting process," he said.

Image copyright Reuters Image caption Mr Trump said he believed the Democrats would "reach out when they're ready"

Earlier Mr Ryan told reporters: "We are going to be living with Obamacare for the foreseeable future.

"I will not sugar-coat this. This is a disappointing day for us. Doing big things is hard.

"We were a 10-year opposition party where being against things was easy to do," he said, adding that it was difficult to get "people to agree with each other in how we do things".

Meanwhile, the leader of the House minority Democrats, Nancy Pelosi, described the retraction as "a victory for the American people".

What did the bill propose?