Women are expected to make up a clear majority of voters in a Democratic primary — nearly 60 percent, according to Celinda Lake, a Democratic pollster who specializes in female voting behavior. But the evolution of abortion rights into a mainstay of the Democratic platform means the issue is unlikely to sway many votes in the primary, she said.

“In a primary, Democrats assume all the candidate are very pro-choice so they would not see a distinction,” Ms. Lake said. “It’s disqualifying not to support abortion rights.”

Strategists from both parties believe that the effects of the abortion ban could be far greater in a general election, when suburban women could, once again, emerge as a crucial swing voting bloc. While the push by Republicans to get the Supreme Court to reconsider the central holding in Roe v. Wade is likely to mobilize socially conservative voters who make up a key piece of their party base, it could turn off moderates and women.

The Alabama law bans abortions at every stage of pregnancy and criminalizes the procedure for doctors, who could be charged with felonies and face up to 99 years in prison. It includes an exception for cases when the mother’s life is at serious risk, but not for cases of rape or incest — a subject of fierce debate among lawmakers in recent days.

The procedure was not immediately outlawed, and it is far from clear when, or even if, the measure will ultimately take effect.

While many conservatives cheered the new law, some Republicans expressed doubt that such a restrictive law would help the party politically in 2020.

“It wouldn’t be a political winner among swing voters, that’s for certain,” said former Representative Ryan Costello, a Republican who represented a moderate suburban Philadelphia-area district through 2018. “Particularly among younger women, college-educated women, it could be an issue that they weigh a bit more heavily if something like this is front and center.”