[ It is far from clear when, or if, the measure will take effect. Read about the next steps. ]

Opponents have vowed to challenge the measure in federal court if it becomes law. Even the legislation’s supporters expect that a lower court will block the measure. But it was drafted with exactly that in mind. The ban’s architects, reflecting the rising confidence of abortion critics nationwide after the appointment of Brett M. Kavanaugh to the Supreme Court, hope that the justices will use the case to reconsider the central holding in Roe and allow the Alabama measure to take effect.

“Until now, there was no prospect of reversing Roe,” said Eric Johnston, who founded the Alabama Pro-Life Coalition and serves as its president, and has spent more than 30 years trying to ban abortion.

[Several states have moved to curtail abortion but Alabama’s measure goes further.]

Mr. Johnston, who drafted the Alabama bill and sees himself as a purist on the abortion issue, said he did not support the spate of restrictive legislation that other states have enacted in recent months, including so-called fetal heartbeat bills. These bills essentially ban abortions after a heartbeat is detected, usually about six weeks into pregnancy, a time when many women do not yet know they are pregnant.

Given the current leanings of the Supreme Court, Mr. Johnston said, making such a measure, which does not directly challenge Roe, the subject of the court’s next major abortion case would be a wasted opportunity.

“Why not go all the way?” he asked.

The Senate gallery was full before the debate started on Tuesday afternoon. A long line of people waited to take seats when people left. Many in the audience were abortion rights activists, and at times they laughed when male lawmakers spoke about pregnancy and other female health issues.