A judge on Tuesday blocked a Missouri law that bans abortion at eight weeks’ gestation, with no exceptions for rape or incest.

The law also includes a slate of other restrictions, all of which are blocked by the judge’s decision except one: a ban on abortion based on the fetus’s race, sex, or diagnosis of Down syndrome.

The law was originally scheduled to go into effect on August 28. If it does go into effect, “it would be nearly impossible for patients in Missouri to access abortion care,” Ashley Gray, a state advocacy adviser for the Center for Reproductive Rights, told Vox in May.

Missouri’s law came as a wave of anti-abortion “heartbeat” bills sweep the country, banning abortion when a fetal heartbeat can be detected, which can be as early as six weeks. Although the initial version of the bill included language about a fetal heartbeat, it was ultimately removed from the version passed by the state legislature last week, state Rep. Nick Schroer, the sponsor of the bill, told Vox in an email in May.

The authors of the bill also pursued a different strategy than abortion opponents in other states. While some legislators, most notably in Alabama, have crafted highly restrictive legislation with the goal of forcing a Supreme Court challenge, Schroer told Vox his goal is “withstanding judicial challenges, not causing them.”

To that end, the law includes a “ladder” of less restrictive time limits designed to take effect if the eight-week ban is struck down in court, according to the Associated Press.

While other lawmakers set their sights on overturning Roe v. Wade, Schroer’s goal was to craft a law that would successfully restrict abortion in his state, no matter what happens to Roe. The strategy might work.

The Missouri law is designed to survive court challenges

The Missouri law, known as HB 126 or the Missouri Stands for the Unborn Act, includes a number of new restrictions on abortion and other provisions. These include the following:

A ban on abortion solely on the basis of the fetus’s race, sex, or diagnosis of Down syndrome.

A requirement that both parents be notified if a minor is seeking an abortion. Previous Missouri law required only one parent to be notified.

An increase to the state tax credit for “pregnancy resource centers,” which provide counseling to “encourage women to carry their pregnancies to term” and do not offer or refer for abortions.

A ban on abortion at about eight weeks’ gestation, with no exceptions for rape or incest. A doctor may perform an abortion because of a medical emergency, but the law places the “burden of persuasion” on the doctor to show that the abortion was necessary, according to the AP.

A “ladder” of bans designed to take effect if the eight-week ban is struck down in court, banning abortion at 14, 18, or 20 weeks.

A “trigger” provision that would ban abortion at any stage of pregnancy, except in the case of medical emergencies, if Roe v. Wade is overturned.

While Georgia’s “heartbeat” bill has provoked concern that it could be used to prosecute patients for seeking abortions, Missouri’s law contains a provision exempting those seeking abortions from prosecution. Providers who violate the law could face five to 15 years in prison.

The Missouri bill started out as a ban on abortion once a fetal heartbeat can be detected, as early as six weeks into pregnancy. But it was amended in the state Senate to an eight-week ban. Though slightly less restrictive than heartbeat bills in other states, it would still ban abortions starting just a few weeks after a missed period, before many people know they are pregnant.

The eight-week ban is in clear conflict with Roe v. Wade and the 1992 Supreme Court decision Planned Parenthood v. Casey, which bar states from banning abortion before a fetus can survive outside the womb, around 24 weeks’ gestation. Like other heartbeat bills around the country, it was quickly challenged in court.

On Tuesday, a federal judge blocked most provisions of the law from going into effect, according to CNN. “The legislation on its face conflicts with the Supreme Court ruling that neither legislative or judicial limits on abortion can be measured by specified weeks or development of a fetus,” the judge wrote; “instead, ‘viability’ is the sole test for a State’s authority to prohibit abortions where there is no maternal health issue.”

The decision temporarily blocks the law while the court considers the merits of the case. The provision banning abortions on the basis of race, sex, or Down syndrome diagnosis is not covered by the decision, according to KCUR.

Lawmakers elsewhere have described recent abortion restrictions as efforts to overturn Roe v. Wade. Alabama state Rep. Terri Collins, the sponsor of a near-total abortion ban in the state, has said she designed the bill to be as strict as possible, including no exceptions for rape or incest, so that it would serve as a prime challenge to Roe v. Wade, the 1973 Supreme Court decision that established the right to an abortion. Some have argued that this strategy could backfire, as the Supreme Court may not want to weigh in on a restriction as unpopular as Alabama’s.

The architects of the Missouri law took a different tack. Rather than crafting a bill solely to force a court challenge, they designed the legislation so that parts of it could stand even if the eight-week ban is struck down in court. The ladder structure of the law is “a first of its kind in the United States as far as we are aware,” Schroer told Vox. If the eight-week ban falls, the 14-week ban would take effect, and so on.

“This will allow our goal of saving lives to remain intact if a portion of the legislation does not,” Schroer said.

The strategy might be successful. Missouri state Sen. Jill Schupp, a Democrat who voted against the bill, told the Associated Press she believes “there are probably some provisions that will pass court challenges.”

Many states ban abortion at 20 weeks, and while some of these bans have been challenged in court, others have been allowed to take effect, often because there are no providers in the state that perform abortions after that point.

Those states, which include Ohio, Indiana, and Kansas, already exist in a post-Roe reality, with residents subject to restrictions that run counter to the 1973 decision. Regardless of what happens with the eight-week ban, Missouri might be poised to join them.