As House Republicans cast the final votes required to pass their exceptionally unpopular plan to repeal and replace Obamacare, Democrats on the chamber floor broke into a threnody for what they suggested were their soon-to-be departed colleagues, singing “Na, na, na, na, hey, hey, hey, goodbye!” as lawmakers across the aisle cheered and shook hands.

The assumption is not unfounded, and Democrats should know. In 2010, Democrats lost a whopping 63 seats and the House majority after the botched rollout of the Affordable Care Act. Now, however, Democrats see the divisive Republican repeal effort as their opportunity to exact proportional electoral revenge. “This is so eerily reminiscent of 2010, it’s a mirror image,” former New York Congressman Steve Israel, who served as the head of House Democrats’ campaign arm between 2011 and 2015, told The Wall Street Journal.

Already, there are signs that the slim passage of the American Health Care Act on Thursday could presage a Republican bloodbath in the upcoming mid-term elections. Of the 217 Republicans who voted for the bill, 14 hail from districts Hillary Clinton won. But the number of conservative lawmakers who stand to face serious electoral challenges are even higher. According to David Wasserman, an expert on House elections and the author of the Cook Political Report, the vote shifted the odds in favor of Democrats in 20 districts, bringing the party closer to the 25 seats it needs to win back the House on November 6, 2018.

Thursday’s vote served up a short-term political win for the G.O.P., which has been trying to repeal Obamacare for some seven years, and for the White House, which suffered an embarrassing defeat when Donald Trump prematurely pushed to pass an earlier iteration of the bill that failed to win over the arch-conservative House Freedom Caucus. But Trump, who promoted A.H.C.A. as necessary to fulfill his campaign promises and appease his base, may have won a battle and lost the war.

While Republican lawmakers made the media rounds Thursday assuring voters that everybody will continue to have access to health care and that nobody with pre-existing conditions would lose coverage, experts say insurance could soon become unaffordable for large numbers of people—particularly those who are old or sick. The nonpartisan Congressional Budget Office estimated that an earlier version of the health-care bill would result in 24 million Americans joining the ranks of the uninsured. The 11 states with the highest percentage of non-elderly adults with pre-existing conditions all voted for Trump. Assuming the Senate passes a similar bill, the effect of the G.O.P. bill would quickly become obvious.

Of course, it’s not obvious that the upper chamber will pass anything resembling the House bill. G.O.P. senators have already said they plan to write their own legislation, which means that dozens of vulnerable House members could have just taken a politically risky vote for the White House without any upside. A Quinnipiac poll from March found that only 17 percent of Americans supported the earlier version of A.H.C.A.—a slim margin of support for lawmakers to gamble their seats on. And that poll doesn’t even take take into account the controversial MacArthur amendment, which weakens the Obamacare regulations protecting individuals with pre-existing conditions—one of the most popular aspects of the current health-care law.

Public support for Obamacare, meanwhile, is at an all time high—a reality Democrats have already begun to capitalize on. Millions of dollars in donations flooded Democratic activist and political groups within hours on Thursday. And as Minority Leader Nancy Pelosi warned moderate Republicans in the lead-up to the vote, the deluge is just beginning. “Some of you have said . . . well, they’ll fix it in the Senate. But you have every provision of this bill tattooed on your forehead. You will glow in the dark on this one,” she said. “So don't walk the plank.”

Former Virginia congressman Tom Davis, a Republican, told the Journal that repealing Obamacare was a political necessity, and that the G.O.P. doesn’t need to pay a price. “Mid-term turnouts are about who shows up,” Davis said. “If the other side is juiced and your side is deflated, that’s a recipe for disaster.”

But Democrats, it seems, are already plenty juiced. “Not only did dozens of Republicans in marginal districts just hitch their names to an unpopular piece of legislation, Democrats just received another valuable candidate recruitment tool,” Wasserman noted. “In fact, Democrats aren't so much recruiting candidates as they are overwhelmed by a deluge of eager newcomers, including doctors and veterans in traditionally red seats who have no political record for the G.O.P. to attack—almost a mirror image of 2010.”