A beaming US President Donald Trump has declared Obamacare "essentially dead" after the House of Representatives narrowly approved his controversial plan to dismantle his predecessor Barack Obama's legacy healthcare programme.

Unfazed by protesters shouting "Shame on you!", Trump and Republicans celebrated after the bill passed the 216-vote threshold, with just one vote to spare – something that had seemed almost impossible for the administration just days ago.

Though the voting largely went as per the party lines, no Democrats backed the bill and 20 Republicans opposed it, an intense series of negotiations preceded the first step to repeal and replace Obama's landmark Affordable Care Act.

Republicans passed the American Health Care Act 217 to 213, taking an important first step to fulfil a seven-year promise to replace the 2010 law.

Moments later, there were celebrations on the White House lawn, where a reception was held for Republicans in the House of Representatives. Nearly 70 Republican members attended the celebration and lined up on the stairs in a photo formation.

Celebrating his victory, Trump, who have campaigned relentlessly on the pledge to dismantle Obamacare, said he was doing well as president, even though he has been a politician only for a brief time.

"Coming from a different world, and only being a politician for a short period of time, how am I doing? Am I doing – OK, I am president. Hey, I am president, do you believe it, right?" he asked the lawmakers.

Indian-American and top healthcare official Seema Verma was seen standing in the front row along with top Republican lawmakers at the White House lawn.

Verma, the administrator of the Centres for Medicare and Medicaid Services, described this as a big day for the US. She is believed to be one of the top officials working to replace Obamacare.

The bill now moves to the Senate, the upper chamber of the US Congress, where it is expected to face difficulties.

But with House Speaker Paul Ryan by his side, Trump exuded confidence that the bill would pass through the Senate.

"This is really an incredible healthcare plan. This has brought the Republican party together," Trump said. 

"Premiums will be coming down, deductibles will be coming down, but very importantly it's a great plan." 

He described Obamacare as a "catastrophe" and called his own "a great plan." Obamacare, he added, was "essentially dead" 

"I actually think it will get even better. This is, make no mistake, this is a repeal and a replace of Obamacare, make no mistake about it," Trump said.

Obamacare was signed into law by Obama on March 23, 2010.

About 20 million Americans gained healthcare coverage under the healthcare programme, but Republicans viewed it as an overreach of the federal government and said patients had less choice and higher premiums.

Republicans say the new bill will lower premiums and deductibles and give consumers more control over their health care. But an array of opponents, including many consumer and patient advocacy groups, say this bill could leave millions facing higher healthcare bills and less coverage.

Later in New York, during a meeting with Australian Prime Minister Malcolm Turnbull, Trump continued to boast about his party's "big day." 

He praised Australia's healthcare system saying they have "a better healthcare… We're going to have great healthcare very soon." "Right now Obamacare is failing." 

"We passed it by a few votes," Trump told Turnbull, to which he replied, "I know the feeling, we have challenges in our parliament too." 

Also in New York, during his first return to his hometown since taking office, Trump was greeted with protests. Hundreds of protesters marched against the president and his policies.

The protests were called before the bill was passed but it appeared as if the first step to scrapping Obamacare further incensed the protesters.

Protesters chanted, "What do we want? Health care! When do we want it? Now!" Others said, "Donald Trump has got to go!" 

According to a report in the New York Daily News, protesters shouted "Not My President," and carried banners that read "Dump Trump" and "Make America THINK Again,". It said the demonstrators sent the message that, despite growing up here and having his name on buildings throughout the city, the lifelong New Yorke billionaire is no longer welcome.

A little over a month ago, attempts to dismantle Obamacare appeared doomed when the Republicans did not have enough vote. But that bill has undergone several changes to satisfy both the conservative and moderate wings of the Republican party.

Vice President Mike Pence claimed this was the beginning of the end of Obamacare. "We have taken the historic first step to repeal and replace Obamacare." 

Describing it as a "big day", Ryan said there were still a few steps left before the new bill could be signed into law.

He said the problems facing Americans were real, referring to the significant jump in the healthcare insurance.

"(Obamacare) has failed and is collapsing," Ryan said, claiming the new bill "makes healthcare more affordable and less vulnerable."