​U.S. Republicans have successfully pushed their prized health-care bill through the House of Representatives.

The narrowly approved legislation passed by a vote of 217-213. No Democrats voted in support of the bill.  

The thin margin was expected, because of opposition from every Democrat and more than a dozen Republicans, in addition to lobbying against the bill by the American Association of Retired Persons, doctors, hospitals and patients' groups.

The bill is expected to face a rough road in the Senate, however, where many senators consider the House bill too harsh. It's expected to undergo substantial changes.

Flanked by Republican lawmakers in the Rose Garden, Trump called former president Barack Obama's health-care law a "catastrophe" and called the Republican bill "a great plan."

Trump said he was confident the bill would make it through the Senate.

"Premiums will be coming down," he said, adding that deductibles would come down, too.

Obamacare, he said "is essentially dead."

"So what we have is something very, very, incredibly well-crafted," the president said, praising lawmakers for passing the bill.

Democrats, who oppose the effort to repeal and replace Obamacare, say the bill is deeply flawed and will harm millions of Americans while giving tax cuts to the wealthy.

Ahead of the vote, Democratic House leader Nancy Pelosi said in a statement that Republicans had made the bill "more costly and more cruel to American families." 

USA-TRUMP/CONGRESS

The bitter health-care battle dominated the Capitol even as Congress prepared to give final approval to a bipartisan $1-trillion financing measure. (Jonathan Ernst/Reuters)

Since it collapsed in March, the measure was revamped to attract most hardline conservatives and some Republican centrists. In a final tweak, leaders were adding a modest pool of money to help people with pre-existing medical conditions afford coverage — a concern that caused a near-fatal rebellion among Republicans in recent days.

The Republican drive was aimed at erasing much of former president Barack Obama's health-care law. Republican candidates including Trump have made repealing that statute a cornerstone of their campaign pledges since its enactment in 2010, claiming it's a failing system that's leaving people with rising health-care costs and less access to care.

The new bill will "gut Obamacare and rescue the American people," said Representative Doug Collins, a Republican from Georgia. 

Democrats defended Obama's law — one of his crowning domestic achievements — for expanding coverage to 20 million Americans and forcing insurers to offer more generous benefits.

"How can you do this to the American people? How can you do this to the people you represent?" said Representative Jim McGovern, of Massachusetts.

Representative Leonard Lance, a Republican from New Jersey who voted against the bill, told CNN's Jake Tapper that he saw several issues with the bill and doubted that it would actually lower people's premiums.

"This needs a bipartisan solution," he said.

The bitter health-care battle dominated the Capitol even as Congress prepared to give final approval to a bipartisan $1 trillion U.S. measure financing federal agencies through September.

The House passed that legislation by a vote of 309-118 on Wednesday, and Senate passage seemed certain as early as Thursday. That would head off a weekend federal shutdown that both parties preferred to avoid — especially Republicans controlling the White House and Congress.

The vote happened before the bill was assessed by the non-partisan Congressional Budget Office, which estimates its cost and effect on insurance rolls. Republicans have said that the bill will be scored by the CBO and other fixes will be made before the Senate votes.

Congress Health Overhaul

Ryan, centre, speaks during a news conference on the American Health Care Act in March. The bill was revamped after it collapsed that month amid bipartisan resistance. (Susan Walsh/Associated Press)

Lance, one of the Republicans who voted against the bill, said he would have preferred to see a CBO score before the vote.

The health-care vote was scheduled after the White House and congressional leaders barraged rank-and-file holdouts with pressure in recent days and claimed they had the votes to prevail.

When he spoke Thursday afternoon, the president thanked Republican House Speaker Paul Ryan for his efforts.

"This has really brought the Republican Party together," Trump said, adding that the party was gearing up to take on tax reform next.

With files from CBC News and Reuters