A federal judge on Tuesday blocked Alabama's abortion ban, which makes performing an abortion in almost all cases a felony, from taking effect on Nov. 15.

U.S. District Court Judge Myron Thompson issued the preliminary injunction in a lawsuit filed by abortion rights groups and providers in May.

"Alabama’s abortion ban contravenes clear Supreme Court precedent. It violates the right of an individual to privacy, to make 'choices central to personal dignity and autonomy," Thompson writes, citing case law.

Thompson's ruling is not unexpected. The legislation, signed into law on May 15 by Gov. Kay Ivey, was expected to hit roadblocks in the federal court.

Supporters hoped the court challenge could ultimately challenge abortion rights at the federal level.

Ivey acknowledged that in a statement issued after she signed the law.

"No matter one’s personal view on abortion, we can all recognize that, at least for the short term, this bill may similarly be unenforceable," the statement said. "As citizens of this great country, we must always respect the authority of the U.S. Supreme Court even when we disagree with their decisions."

The law makes it a Class A felony, punishable by life or 10 to 99 years in prison, for anyone to perform an abortion. Attempting to perform an abortion would be a Class C felony, punishable by one to 10 years in prison. The woman who sought the abortion would not be held criminally liable.

The only exceptions allowed under the law would be the health of the mother; a mental illness that could result in a woman's death or a child's death if she gives birth; or if a fetus had a lethal anomaly.

The lawsuit argues the law would all but ban abortion in Alabama, and fall disproportionately on black women, who made up 60 percent of those seeking abortions in Alabama.

"Being forced to continue a pregnancy against one's will can pose a risk to a person's physical, mental and emotional health, and even their life, as well as to the stability and well-being of their family, including existing children," the lawsuit states.

This summer, attorneys for Alabama and the abortion providers indicated in court filings that they would both agree to delay the law until May to give time to resolve the lawsuit.

The Associated Press contributed to this report.

Contact Montgomery Advertiser reporter Melissa Brown at 334-240-0132 or mabrown@gannett.com.