Washington (CNN) A federal judge has blocked a controversial Alabama abortion bill that would block almost all abortions, calling it a "ban" that "contravenes clear Supreme Court precedent."

US District Judge Myron Thompson issued a preliminary injunction on Tuesday barring the Human Life Protection Act from taking effect until the court resolves the case in full. The law was slated to go into effect next month.

Thompson's decision to block the Alabama ban means that all of the state laws passed this year restricting early-stage abortions have been blocked from going into effect by the courts.

In the 17-page opinion, Thompson wrote that the state's abortion ban "violates the right of an individual to privacy, to make choices central to personal dignity and autonomy." Thompson also stated that the ban "diminishes the capacity of women to act in society, and to make reproductive decisions."

Thompson added, "It defies the United States Constitution."

Read More