Alabama’s quest to outlaw abortion throughout the state has led to some pretty wild laws justified under some rather kooky pretexts. There’s the “fetal heartbeat” bill, outlawing abortion after six weeks, which legislators justified as a continuation of Brown v. Board of Education. There’s the teens-on-trial law, which allowed a judge to appoint a lawyer to represent a teen’s fetus—and bring the district attorney into court to question the teen and call witnesses on behalf of her fetus. Then, of course, there’s the treat-abortions-like-sex-offenders law, which forbade any abortion provider from operating within 2,000 feet of a public K-8 school.

On Thursday, U.S. District Judge Myron H. Thompson blocked the last of these measures from taking effect, holding that it almost certainly violated Alabamans’ constitutional rights. He also suspended the evocatively named Alabama Unborn Child Protection From Dismemberment Abortion Act, which would’ve required doctors to stop a fetus’s heart before performing a second-trimester abortion. Neither of these laws, Thompson ruled, could survive the undue burden test, which requires courts to weigh “the burdens imposed on abortion access” against “the benefits those laws confer” unto women.

As my colleague Christina Cauterucci has reported, Alabama’s primary justification for the treat-clinics-like-sex-offenders law is almost unbelievable: The state allegedly wanted to minimize the disruption to schools that abortion protesters might cause. Thompson found a few problems with this logic. First, there aren’t many protesters at the two clinics that the law affected, and they aren’t especially noisy. Second, there is no record of protests actually disrupting any school’s “educational environment.” Third, the law is simply unfair: It purports to be concerned about clinic protesters, but it achieves its goal by shutting down clinics themselves.

Alabama also justifies the law by insisting that it’s necessary to protect “a parent’s right to control their children’s exposure to the subject of abortion.” Thompson easily dispatches this claim by noting that although the clinics may be near schools, parents’ routes to and from the schools do not actually pass by the clinics. Moreover, protesters demonstrate all across town, including at abortion provider’s personal residences and at hospitals that give providers admitting privileges. In such a vigorously anti-abortion climate, Thompson notes, there is simply no way to prevent one’s child from witnessing abortion-related protests.

The flimsiness of these rationales is important because the two Alabama clinics within 2,000 feet of schools provide about 72 percent of all abortions in the state. Closing them, then, would place a significant burden on women’s ability to terminate their pregnancies, forcing them to drive many miles in order to obtain the very safe and simple procedure. (Indeed, a cynic might even wonder whether the legislature passed this law for the very purpose of shutting down these two clinics.) Thompson noted that when just one of these clinics temporarily closed in 2015, “women would nonetheless show up to the clinic seeking an abortion—including one woman who threatened to stab herself in the stomach.” During that period, the other clinic received a surge in calls from women, some of whom said “outright that they would try to self-induce an abortion because they could not reach a provider.”

Even with both clinics open, the overall paucity of abortion providers in Alabama has taken its toll: Thompson writes that recently, one clinic’s medical director “has treated multiple women who attempted to self-abort, such as a woman who consumed turpentine after consulting the Internet and learning about its use as a folk remedy.” He then adds this footnote, citing a study on the history of women’s health in America:

Incidentally, women in the South have resorted to turpentine before. One study from 1936 reported that rural black women in Georgia consumed turpentine for self-induced abortions. Turpentine relies on ingredients similar to those reportedly used by southern slaves seeking to self-abort.

This striking aside pulls together Thompson’s implicit thesis: Laws like this one have the effect of demeaning women, forcing them into dangerous desperation. The burden of anti-abortion laws, moreover, will always fall on underprivileged women—who are in Alabama disproportionately black—creating a lower caste of women who cannot afford access to a fundamental right. This degradation of women’s humanity is intolerable to the 14th Amendment, whose Due Process Clause guarantees liberty for all—not just wealthy women who have the time and money to procure an abortion elsewhere.

Thompson also easily suspends the Dismemberment Abortion Act, concluding that it adds significant risk to the procedure (by requiring the injection of lethal chemicals into the fetus) without providing women any benefit at all. Overall, his decision is a model of careful reasoning, evidence-based analysis, and judicial scrutiny. Refreshingly, it also treats women like actual human beings, rather than abstractions with no true agency. Alabama will surely respond with new and equally nutty abortion restrictions. But the state is on notice that the courts will no longer tolerate its attempts to limit women’s autonomy under the most laughable of pretenses.