The state's Republican backers have pushed the legislation, which amounts to a near-total ban on abortion in the state, forward with the express goal of overturning Roe v. Wade, the Supreme Court case legalising abortion, CNN reported.
After more than four hours of debate on Tuesday night, the Republican-led Senate voted 25-6 to pass "HB 314", which would slap doctors with up to 99 years in prison for performing an abortion.
The Alabama House passed the bill earlier this month.
The law only allows exceptions "to avoid a serious health risk to the unborn child's mother", for ectopic pregnancy and if the "unborn child has a lethal anomaly".
Democrats re-introduced an amendment to exempt rape and incest victims, but the motion failed on an 11-21 vote.
Republican Governor Kay Ivey will have six days to sign the legislation, though the bill would not take effect until six months after becoming law.
Ivey has not publicly taken a stance on the bill but has previously aligned herself as anti-abortion.
"As this legislation is still making its way through the legislative process, the governor intends to withhold comment until it makes its way to her desk for signature," Ivey spokeswoman Lori Jhons said in a statement on Tuesday night.
American Civil Rights Union of Alabama Executive Director Randall Marshall said that his organisation would join with the national ACLU, Planned Parenthood, and Planned Parenthood of Southeast to challenge the bill in court within "a few weeks" should it become law.
Anti-abortion campaigners have successfully enacted a ban on all or most abortions in six Republican-led states: Arkansas, Kentucky, Mississippi, North Dakota, Ohio and Georgia, reports the Guardian.
At least 61 bills like this have been introduced across the country.
Even in states considered safe havens for abortion rights, such as New York and Illinois, anti-abortion lawmakers have introduced bills as a kind of protest.