Donald Trump's flagship healthcare bill has been killed off after failing to secure enough support from Republicans, in a major embarrassment for the US President during his first attempt at passing legislation through the House.

The decision, made just minutes before the vote was due to take place, will be viewed as a significant set back for Mr Trump, who has promised to repeal and replace Obamacare.

Republican House Speaker Paul Ryan told Mr Trump just ahead of the scheduled Friday vote that there were too many dissenting Republicans to pass the American Health Care Act. The White House could only afford to have 22 Republicans vote 'no' on the bill.

“We came very close,” Mr Ryan said in a press conference.

He said the failure to reach the required 216 votes to pass the bill was a result of “moving from an opposition party to a governing party - you have growing pains".

“The president gave his all in this effort...he’s really been fantastic,” said Mr Ryan.

In a hastily arranged news conference, Mr Trump said "we learned about loyalty" in the process of the bill's failure to garner enough votes, but was clear to place blame on Democrats.

Saying the bill had no votes from the opposition, Mr Trump said "I think the real losers are [Democratic Minority Leader] Nancy Pelosi and [Senator] Chuck Schumer...they own Obamacare."

Mr Trump continued his rhetoric that Obamacare is a "mess" solely created by Democrats.

House Speaker Paul Ryan addressing the media (Getty)

However he also said "when [Obamacare] explodes - which it will soon - what would be good is if they work with us" to get a better, bipartisan health care bill.

"I worked as a team player" and "learned a lot...about arcane rules in the Senate and the House," Mr Trump said, likely referring to the Senate's Byrd Rule.

It kicked in because Republicans used a method - called the "reconciliation process" - to try and pass a bill that prevented Democrats from filibustering the bill.

However, it also limited the concessions the White House could make to dissenting Republicans known as the Freedom Caucus. The bill would have gone to the Senate once it passed the House.

Vice President Mike Pence and Office of Management and Budget Director Mick Mulvaney joined Mr Trump in aggressive lobbying for votes on the bill with members of the dissenting Republican faction

Despite several concessions and promises being made, Freedom Caucus members still had major concerns about provisions such as the "essential health benefits"; a list of required items that insurance companies must cover for each person under Obamacare regulations.

Trump says 'Obamacare is dead' as he prepares to repeal and replace healthcare act

A dejected Mr Ryan said “this is a setback, no two ways about it” and described the Republican conference as “let down.”

Mr Ryan said he does not blame anyone, but did say it “all comes down to a choice...Are all of us willing to give a little to get something done?”

House Democratic Minority Leader Nancy Pelosi said in a press conference “what happened on the floor today...is a great day, it's a victory...for the disabled, for senior citizens.”

Mr Trump said he was "disappointed and a little bit surprised." Next up for the White House is pursuing tax reform "very strongly", he added.

The bill will also come as a blow to many on Capitol Hill. Several Congressional Republicans ran and won on platforms featuring the repeal and replacement of Obamacare.