A district court judge struck down North Dakota’s early abortion ban on Wednesday, ending one of the country’s strictest abortion laws and reaffirming a higher court’s ruling on women’s reproductive rights.

U.S. District Court Judge Daniel Hovland wrote in his decision that the state’s push to end abortions after six weeks of pregnancy is “invalid and unconstitutional.” The law, often referred to as a "heartbeat law," was passed last year, and it was intended to prohibit abortions after a fetal heartbeat is detected. That can happen as early as the sixth week of a pregnancy, which is before many women are even aware they are pregnant.

“The United States Supreme Court has spoken and has unequivocally said no state may deprive a woman of the choice to terminate her pregnancy at a point prior to viability,” Hovland wrote. The Supreme Court legalized abortion in the U.S. with the 1973 Roe v. Wade decision. It defined viability as the potential for the fetus to live outside of the mother's womb by natural means or with life-supportive systems, which usually begins at the start of the third trimester.

The heartbeat law was among four anti-abortion measures that the state’s Republican Gov. Jack Dalrymple signed into law last year with support from a Republican-led legislature. However, the state’s only abortion provider, Red River Women’s Clinic, was able to fight the measure with help from the New York-based Center for Reproductive Rights, which filed the suit on behalf of the clinic last June. The center settled a lawsuit against another state law that required abortion providers to have admitting privileges at a local hospital. But it is still challenging the state’s ban on medication abortion, which is now being reviewed by the Supreme Court.

Nancy Northup, the center’s president and chief executive officer, said women in North Dakota are already facing “innumerable obstacles” to safely and legally end pregnancies. The heartbeat law, she said, would eliminate “all safe and legal options for hundreds of miles in every direction.”

“The court was correct to call this law exactly what it is: a blatant violation of the constitutional guarantees afforded to all women,” Northup said. “But women should not be forced to go to court, year after year in state after state, to protect their constitutional rights.” She hopes this decision sends a strong message to lawmakers looking to use legislation to take away women’s reproductive rights.