The U.S. House on Thursday passed the American Health Care Act, 217 to 213, fulfilling a long-held promise to begin unraveling and replacing former President Barack Obama's 7-year-old signature health-care reform known as Obamacare.

The vote was the culmination of months of whiplash politics and intraparty squabbling, with the fate of the bill iffy until Wednesday. For months the Republican majority in the House was unable to muster enough votes to pass the controversial, and in some quarters deeply unpopular, replacement plan.

Twenty Republicans voted against the measure. Every Democrat voted against.

Reaction from both sides of the bitterly divisive issue was swift.

"Today, we took a major step forward to repeal and replace Obamacare. Not only does this legislation rescue millions of Americans from Obamacare's crushing taxes and collapsing health care market, it lays the foundation for a health care system based on what workers and families want and need," U.S. Rep. Kevin Brady, R-The Woodlands, who was one of the architects of the AHCA said in an emailed statement moments after the vote.

"Thanks to President Trump's leadership and House Republicans' unwavering commitment to find solutions, we are moving forward on our promise," his statement said.

Critics of the measure, however, did not hide the anger and frustration that has swirled around the bill that they say will leave millions unable to afford insurance and shut out of needed medical care.

Your browser does not support the iframe HTML tag. Try viewing this in a modern browser like Chrome, Safari, Firefox or Internet Explorer 9 or later.

"No one chooses to be ill or injured. It is unethical to take away people's healthcare coverage and remove the safeguards that allow them to be insured," Victoria Estrada, executive director of Texas Doctors for Social Responsibility, said in an email to the Chronicle.

"Is this who we are as a nation? Is this what President Trump meant by 'making America great again?' asked Frederick Isasi, executive director of Families USA, a national health care advocacy group, in another emailed statement.

The measure now goes to the U.S. Senate where its fate is equally unknown but it is widely expected that significant changes will need to be made to secure passage there.

RELATED: What is in the Republican health-care bill?

Unveiled March 6, the AHCA met with swift opposition from both sides of the ideological spectrum as Democrats and some moderate Republicans worried it would strip health coverage from millions of Americans, while conservative hard-liners said it did not go far enough to completely eliminate the Affordable Care Act and replace it with a free market system.

The Congressional Budget Office has estimated as many as 14 million people could be without coverage by 2020. In Texas, public policy analysts, health care experts and insurers said a half million or more could become uninsured, erasing about half the gains made under the Affordable Care Act and spiking the number of uninsured in a state that already leads the nation.

Conservatives were brought on board with the addition of an amendment last month that returned to states more latitude, allowing them to waive requirements on insurers including the ability for them to charge more – sometimes much more – for people who are determined to be riskier because of pre-existing or chronic conditions. Obamacare had made such practices illegal.

The thinking was that by loosening regulations, insurers could write less expensive plans for healthier people who use less care which in turn would lower premiums for those customers.

At issue, though, has long been what to do with those who have chronic or pre-existing conditions. It became a sticking point for some Republicans who feared a backlash from angry constituents. Just two days ago it appeared as if the bill could not pass.

It was already pulled from a floor vote in March because it did not have the votes to pass. A second failure was seen as political disaster for House republican leaders and President Donald Trump who has strongly backed the bill.

RELATED: Trump appears fuzzy on health care bill details

But then a last-minute amendment Wednesday to add $8 billion on top of the $115 billion already going to states spread out over time seemed to do the trick. Of the total, $23 billion must go specifically toward covering those with pre-existing conditions.

Many unknowns still remain, however. The Congressional Budget Office has not yet scored the latest version of the bill so it is not known how many could be without coverage under the provisions that allow sick people to be charged more. It is also not clear how individual states will react.

Texas Gov. Greg Abbott's office did not respond to an emailed question on how the state would proceed.

It is expected that many states, including Texas, will return to high-risk pools which separate the sick from those with less costly health-care needs. Texas previously had such a system, but critics said it was very expensive and covered far too few people.

A recent study by the nonpartisan Kaiser Family Foundation found that an estimated 4.5 million adult Texans under the age of 65 have a pre-existing or chronic condition that before the ACA could have left the uninsurable on the individual market.

Further analysis released Thursday by Avalere, a leading Washington. D.C.-based health-care consulting firm, concluded that AHCH funding specifically earmarked to cover those with pre-existing conditions would cover only about 5 percent of Americans, or 110,000 people, who are currently covered on the individual market.

In Texas, the analysis estimated 187,000 people now covered by ACA plans have a pre-existing conditions. Under the AHCA, the number of people covered could be as few as 9,000.

"There is not enough money in the ACHA to cover those who need it most in Texas," Chris Sloan, senior manager at Avalere, said Thursday morning. "I'ts not just Texas, they were awful everywhere."