In the days leading up to today's vote, a group of conservative Republicans, members of the House Freedom Caucus, threatened to withhold their support, arguing the replacement did little to lower premium costs.
They were banking on the bill's failure in the House as a victory for them back home.
Just as it was in the run-up to the Affordable Care Act vote early in President Barack Obama's first term, Republican leaders and President Donald Trump freely wheeled and dealed to acquire the last few votes.
Conservatives met Thursday morning with Trump to press for eliminating the federal requirement that insurance plans include basic benefits, such as maternity care, emergency services and wellness visits.
Eliminating those requirements would certainly reduce premium costs for some -- older men for example -- but raise them for others, like women starting a family.
But for each conservative who climbed on board, a moderate Republican pulled their support.
In the end, there were not enough votes in the middle between hard-line conservatives and Republican moderates.
The nonpartisan Congressional Budget Office estimated 24 million people would no longer have health insurance with the Republican plan, spooking many moderates.
By further appealing to conservatives late in the game, however, Ryan and Trump engaged in a dicey tightrope walk.
Now, Ryan and House leaders are back to the drawing board.
Anything House Republicans come up with now, however, makes the outlook of passage in the Senate even more problematic.
That's because of two factors:
The first is that any changes involving the American Health Care Act have to be budgetary, in which case only 51 votes are needed for passage in the Senate.
More extensive policy changes would require 60 Senators to agree to allow a vote, which won't happen without the support of Democrats, and there is no indication that Democrats will vote for any repeal of Obamacare.
The other factor is political, and defined by the differences in constituencies between Senators and Representatives.
Over the years, Republicans have been able to successfully make their seats more and more Republican by creating districts that heavily pack Democrats into fewer districts.
That means Republican House members can afford to be more hard-line because their districts back home are less homogenous.
The Senate however, has no districts; simply two senators per state.
The opposition to the Republican health care plan in the Senate comes from opposite directions -- both from conservatives and moderates.
Appeasing one side would lose votes on the other.
According to a piece in New York Magazine by Margaret Hartmann, conservatives who aren't on board include Rand Paul, Ted Cruz and Mike Lee.
On the other side are the moderate Republicans who worry too many people would lose their coverage.
They include Susan Collins, Bill Cassidy, Dean Heller, Rob Portman, Cory Gardner, Shelley Moor Capito and Lisa Murkowski.
House members now must come up with a plan B, and start the whole cycle over again.
The next few weeks will tell.