The House on Thursday gave its OK to a GOP deal erasing much of former President Barack Obama's health care law.

The third time was the charm, as the vote failed to come to fruition on two other occasions.

The measure skirted through the House by a thin 217-213 vote, as all voting Democrats and a group of mostly moderate Republican holdouts voted no.

GOP leaders predicted they'd deliver a victory for President Donald Trump just weeks after nearly leaving the measure for dead. Passage of the AHCA gives Trump a victory, following through on a campaign promise to repeal and replace "Obamacare."

The Republican health care bill had been pulled from the House floor twice because it didn't have enough GOP support.

But some Republicans flipped their votes from "no" to "yes" after an amendment was added to help with costs associated with enrollees' pre-existing conditions.

"After seven long years, Americans across Florida and the entire nation can breathe a sigh of relief today because we fulfilled our promise to repeal and replace Obamacare," Republican Florida Rep. Dennis Ross said.

"By working with President Trump and uniting to pass the AHCA, we are putting patients first and ending an era of skyrocketing premiums, massive tax hikes and burdensome mandates and penalties," he said.

Democratic Rep. Val Demings said the Republican party "ignored the voices of millions of Americans by pushing through this disastrous bill."

"We know 24 million people will lose coverage, premiums will go up, and people with pre-existing conditions will face astronomical out-of-pocket costs," Demings said. "Trumpcare will use its "savings" to give tax breaks to the richest in America."

A few minutes before the vote became official, Trump tweeted that Democrats were trying to defend a "lie."

The amendment would provide an extra $8 billion over the next five years to an existing $130 billion to help people with pre-existing conditions pay for their coverage. This funding would go to so-called "high risk pools" that will be set up by states.

The current legislation also allows states to apply for waivers that could result in insurance companies charging higher premiums to those with pre-existing conditions.

The legislation would eliminate tax penalties under Obamacare for people without health insurance. It would also cut the Medicaid program for low-income people and would allow states to impose work requirements for Medicaid recipients.

Groups such as AARP and the American Medical Association were opposed to the bill. They don't think it offers the same protections Obamacare did for people with pre-existing conditions.

But the White House pledged everyone will be covered.

“The president has made it very clear that pre-existing conditions are covered in the bill in every scenario. I don't know how much clearer we can state it,” Press Secretary Sean Spicer said.

How each Central Florida, Tampa Bay-area representative voted

Congressmen and women in the Central and Bay areas voted along party lines.

District

Congressman

AHCA vote

District 2

Rep. Neal Dunn (R-Panama City)

Y

District 3

Rep. Ted Yoho (R-Gainesville)

Y

District 6

Rep. Ron DeSantis (R-Marineland)

Y

District 7

Rep. Stephanie Murphy (D-Winter Park)

N

District 8

Rep. Bill Posey (R-Rockledge)

Y

District 9

Rep. Darren Soto (D-Kissimmee)

N

District 10

Rep. Val Demings (D-Orlando)

N

District 11

Rep. Daniel Webster (R-Minneola)

Y

District 12

Rep. Gus Bilirakis (R-Palm Harbor)

Y

District 13

Rep. Charlie Crist (D-St. Petersburg)

N

District 14

Rep. Kathy Castor (D-Tampa)

N

District 15

Rep. Dennis Ross (R-Lakeland)

Y

District 16

Rep. Vern Buchanan (R-Longboat Key)

Y

District 17

Rep. Tom Rooney (R-Okeechobee)

Y

SOURCE: House.gov

Previous info

A day before the House vote, House Majority Leader Kevin McCarthy of California was very confident, telling reporters they have enough votes.

“We're going to pass it, we're going to pass it. Let's be optimistic about life,” he said.

He also tweeted the following:

Democrats, however, say the GOP plan still doesn't have enough support, and no Democrat plans to vote for it.

“The latest Republican plan to gut essential health benefits and protections for pre-existing conditions will make it impossible for millions of Americans to afford the health coverage they desperately need. This is deadly,” Minority Leader Nancy Pelosi said.

Tennessee Democratic Rep. Jim Cooper said via Twitter that the plan won't help those with pre-existing conditions financially.

Not all House Republicans have gotten on board with the GOP's bill. On Thursday, Florida Rep. Ileana Ros-Lehtinen maintained her standing not to support her party's health care bill.

“Even with the revisions to the AHCA, I cannot and will not vote for a bill that does not substantially benefit my South Florida constituents. I remain a no vote on this bill because too many in my community will be negatively impacted by this bill."

Ros-Lehtinen plans to retire from Congress next year.

The Associated Press contributed to this story.