The Alabama Senate passed legislation that bans nearly all abortions in the state on Tuesday evening, sending the measure to Gov. Kay Ivey's desk to be signed into law.

The bill would make it a felony for a doctor to perform or attempt an abortion during any stage of pregnancy. Anyone performing an abortion could be punished by 10 to 99 years in prison, but no criminal charges would be filed against the person undergoing the procedure.

The measure would ban abortions in virtually all instances in Alabama. The House approved a version of the bill that had an exception for the mother's health, yet removed the exceptions for rape and incest during the Senate hearings.

The bill’s proponents say they hope the legislation, along with abortion restrictions in other states, will set up a Supreme Court battle that will see the overturning of the landmark Roe v. Wade decision that first legalized abortion. 

State Rep. Terri Collins, who sponsored the bill, told The Washington Post she empathized with survivors of rape and incest, but said that the exceptions were specifically left out so that the law would be strong enough to force a federal court battle.

“This bill's purpose is to hopefully get to the Supreme Court and have them revisit the actual decision, which was is the baby in a womb, a person? And we believe technology and science shows that it is. You can see that baby tissue develop all the way through now,” she told NBC News.

Democrats have called the bill an "extreme attack" on women's freedoms.

Gov. Kay Ivey, a Republican, has not indicated whether she will sign the bill. If she does, it would be the strictest abortion law in the country.

Sixteen states have passed or are currently considering abortion bans once a fetal heartbeat is detected about six weeks into pregnancy. Georgia, Mississippi, Kentucky, and Ohio have all approved so-called heartbeat abortion laws.