Republicans in the House of Representatives voted today to approve a version of the American Health Care Act, their bill to repeal and replace Obamacare. The biggest effects of the bill will be on the millions of additional Americans who would go without health insurance if a similar bill is passed by the Senate. But it could also endanger the job prospects of the Republican members of Congress who voted for it and make a Democratic takeover of the House substantially more likely in 2018.

The previous version of the AHCA — which died in the House in March before it came to a floor vote — was an exceptionally unpopular bill. Polls in mid-March had opposition outweighing support for the bill by an average of almost 15 percentage points, and the numbers were getting worse; most notoriously in a Quinnipiac poll that showed just 17 percent of Americans supporting the bill and 56 percent opposed.

The various amendments to the AHCA since then — which were mostly made to placate the Freedom Caucus and have pushed the bill further to the right — aren’t likely to make it any more popular. Some of the amendments could even affect people who receive insurance from their employers in addition to those who receive Medicaid or buy insurance on the Obamacare exchanges. Republicans are also playing with political fire to pass such a bill before the Congressional Budget Office has scored the amendments and estimated how many additional people might gain or lose coverage.

In 2010, Democrats who voted for Obamacare paid a huge price in the midterms. Just how big a price? A 2011 study by FiveThirtyEight contributor Seth Masket and another political scientist, Steven Greene, found that Democrats who voted for Obamacare lost 6.6 to 7.6 percentage points of the vote, depending on which model they used. Note, however, that these totals refer to the share of the vote the Democrat lost and not to the margin that the Democrat had against the Republican. Since third-party candidates are rarely major factors in House races, almost every vote the Democrat loses is one the Republican gains. Thus, the effect on the Democrat’s margin against the Republican was roughly twice that — 13 to 15 percentage points. That’s a huge effect; it means that a Democrat who was on track to cruise to re-election by 12 points would lose if they’d voted for Obamacare.

A later study by Masket, Greene and three other researchers found impacts of a similar magnitude, estimating a 5.8 percentage point Obamacare effect on the Democrat’s vote share using one technique, and an 8.5-point effect using another. Again, these are vote shares, not vote margins. (We usually think in terms of margins here at FiveThirtyEight). The margins would be roughly twice as high — in the range of 12- to 17-point penalty for a Democrat who voted for Obamacare.

If Republican members should suffer a similar penalty for voting for the AHCA — somewhere in the neighborhood of 15 points — it could put dozens of GOP-held seats in play. Some 33 Republicans won their seats by 14 percentage points or less in 2016 ; of those, 27 voted for the AHCA.

Republicans in the next tier or two down could also be vulnerable, however, because the overall political climate is likely to be a lot worse for Republicans than it was in 2016. In 2016, Republicans won the aggregate popular vote for the U.S. House by about 1 percentage point. Democrats currently have a 5- to 6-point lead in polls of the 2018 House vote, however. Moreover, the numbers for the president’s party usually get worse over the course of the midterm cycle as more voters tune into the political process. There could easily be an overall partisan swing of 5 to 10 percentage points against Republicans, therefore. It’s not quite clear how this partisan swing would interact with the AHCA penalty — whether you’d add them together or whether that’s double-counting — but it should be enough to make a lot of Republican incumbents nervous. There are 58 Republicans who won by less than 20 points in 2016 and who voted for the AHCA.

There are some mitigating factors for Republicans, however. Unlike Obamacare, the AHCA is somewhat unlikely to become law, at least in its present form: It faces considerable opposition in the Senate, which would likely pass a more moderate bill if it passed one at all. The Republican process for negotiating the AHCA also hasn’t been as drawn out as the one Democrats had for Obamacare. And President Trump makes a lot of news that could compete with the health care vote for attention. If the bill quietly dies in the Senate this summer, for instance, it’s not clear that a vote taken in May 2017 will be at the top of voters’ minds in November 2018.

Then again, in 2010, Democrats engaged in a lot of wishful thinking around Obamacare, hoping they could avoid the effects from passing a substantially unpopular piece of legislation that affected one-sixth of the U.S. economy. They were wrong; they got their health care bill but not without a big electoral price.

There’s even a chance that Republicans could suffer a bigger penalty than Democrats did. As unpopular as Obamacare was as it was being debated by Congress in 2009 and 2010, the AHCA is more unpopular still.