A federal judge on Tuesday temporarily blocked a Georgia law that would have banned abortion once a fetal heartbeat is detected.

The law, signed in May by Georgia’s Republican governor, Brian Kemp, restricted the procedure as early as six weeks into pregnancy, before many women realize they are pregnant. The measure, one of the strictest in the nation, was scheduled to take effect on Jan. 1.

After a legal challenge from abortion rights advocates, Judge Steve Jones of the U.S. District Court for the Northern District of Georgia issued a preliminary injunction blocking the law while it is argued in court.

Jones wrote the plaintiffs met their burden of showing the ban would cause “irreparable harm” and violate a woman’s constitutional right to privacy. He also stated that the U.S. Supreme Court has “repeatedly and unequivocally” held that a state cannot ban abortion before viability.

Lawyers with the American Civil Liberties Union, Planned Parenthood and the Center for Reproductive Rights filed a challenge to the law in June.

Georgia was among several states this year to pass legislation banning abortions in early pregnancy, working to get the issue in front of the conservative majority on the Supreme Court. The laws are all facing ongoing challenges in court.

Georgia’s law specifically stated that a fetus is a “natural person” and “human being” once a heartbeat is detected.

The law included exceptions for incest, rape and situations of medical futility or where the health of the mother is at stake. But the federal judge on Tuesday wrote the exceptions “do not save it from being an otherwise unconstitutional pre-viability abortion ban."

The state characterized the law not as a ban but rather a “restriction.” Lawyers on behalf of the state argued that Georgia had an interest in protecting the life of the unborn and that the “precise contours” of that interest remain undefined.

“What is clearly defined, however,” Jones wrote in response, “is that under no circumstances whatsoever may a State prohibit or ban abortions at any point prior to viability, no matter what interests the State asserts to support it.”

The governor’s office could not be immediately reached for comment, but a Kemp spokeswoman, Candice Broce, told the Associated Press that the governor is reviewing the decision.

“Despite today’s outcome, we remain confident in our position,” Broce wrote in a statement. “We will continue to fight for the unborn and work to ensure that all Georgians have the opportunity to live, grow, and prosper.”

Emily Nestler, a senior staff attorney at the Center for Reproductive Rights, celebrated the judge’s decision, calling the law “a clear attempt to overturn Roe v. Wade,” the 1973 Supreme Court ruling allowing abortion rights.

Talcott Camp, deputy director of the ACLU’s Reproductive Freedom Project, called it “a victory for people in Georgia and a reminder that these attacks on abortion access are illegal."

She added: “Abortion is still legal in all 50 states. We won’t stop fighting until we defeat all efforts to block access.”