One month after the Supreme Court struck down the right to an abortion, Democrats who then controlled the House pushed through a bill aimed to ensure access to contraception nationwide. All but eight Republicans opposed it.

That vote two years ago, opposing legislation that would protect the right to purchase and use contraception without government restriction, may come back to haunt Republicans in November, as they seek to keep hold of their slim majority at a time when real fears about reproductive rights threaten to drive voters away from them.

The risks they face became glaringly clear last week, after the Alabama Supreme Court ruled that frozen embryos should be considered children. In response, a stampede of Republicans in Congress have rushed to voice their support for in vitro fertilization treatment — even though they have supported legislation that could severely curtail or even outlaw aspects of the procedure.

A new national poll conducted by Americans for Contraception and obtained by The New York Times found that most voters across the political spectrum believe their access to birth control is actively at risk, and that 80 percent of voters said that protecting access to contraception was “deeply important” to them. Even among Republican voters, 72 percent said they had a favorable view of birth control.

When voters were told that 195 House Republicans had voted against the Right to Contraception Act, 64 percent of them said they would be less likely to support Republican candidates for Congress, according to the poll. And overall, the issue of protecting access to contraception bolstered voters’ preference for Democrats by nine points, giving them a 12-point edge over Republicans, up from three.

The survey found that birth control access was especially motivating to critical groups in the Democratic coalition, including Black voters and young people, who are currently less enthusiastic about the election.