The Trump administration is currently forcing an undocumented teenager in federal custody to carry her unwanted pregnancy to term. Can the government do that? Jane Doe, the pseudonym of the minor in question, argues it cannot and has sued the administration in federal court. The Department of Justice argues that it is perfectly lawful for the government to prevent Doe from terminating her pregnancy; if she wants an abortion, the DOJ explains, she should self-deport. A federal judge ordered the administration to let Doe obtain the procedure, but a three-judge panel for the U.S. Court of Appeals for the District of Columbia reversed, attempting to broker a legally dubious and unworkable compromise. Now Doe is asking the full D.C. Circuit to let her terminate her 15-week pregnancy before time runs out.

Doe’s struggle to assert control over her reproductive capacities is bolstered by the fact that, for now, women in the United States have a constitutional right to abortion access. But that right is not guaranteed to last. Should President Donald Trump replace a single pro-choice justice with an abortion foe, there is a good chance the new conservative majority will overturn Roe v. Wade. The demise of Roe would carry dramatic consequences, some of which we can foresee and some of which we can’t. One thing we do know is that if Roe goes, there will be thousands more Jane Does—detained women who would be denied access to abortion by their government. It is these detainees, then, who are on the front line of the abortion battle. That’s because it is their pregnancies that the state can most easily control.

Even today, few women in federal or state custody have ready access to abortion. In Planned Parenthood v. Casey, the Supreme Court held that the government may restrict abortion but cannot place an “undue burden” on women seeking to terminate their pregnancies pre-viability. Female prisoners seeking an abortion, however, may face an extra hurdle. In Turner v. Safley, the high court ruled that inmates may be deprived of some constitutional rights, such as free speech, so long as that deprivation is “reasonably related to legitimate penological objectives.” Confusingly, though, other rights, such as freedom from race discrimination, apply behind bars in full force.

It is unclear whether abortion should be subject to the lenient Turner standard or the more stringent Casey standard. And if the Turner standard does apply, it’s difficult to determine which anti-abortion regulations pass constitutional muster. The U.S. Court of Appeals for the 3rd, 5th, and 8th Circuits have all evaluated prison policies that severely curtailed inmates’ access to abortion. The 3rd and 8th Circuits struck them down; the 5th Circuit found them to be constitutional.

This jurisprudential ambiguity has allowed both federal and state prisons to prevent inmates from obtaining abortions—often by demanding that they obtain a court order allowing them to access the procedure. This process is onerous and time-consuming, and officials can drag it out until the pregnancy is viable, rendering an abortion illegal. (Alabama has appointed guardians to represent the fetuses of pregnant prisoners who want abortions.) Moreover, federal law bars the government from covering the costs of abortions for federal prisoners except in cases of rape or when the mother’s life is in danger. Most states also require state prisoners to pay for their own abortions. And the government cannot cover abortions for immigrants held in detention centers by Immigration and Customs Enforcement. All of these women must pay for their own abortions, even though the government is responsible for their medical care. Many simply cannot afford the costs.

The courts have allowed this system to develop while abortion remains, in theory, a constitutional right. If the Supreme Court overturned Roe and Casey, the threadbare protections for incarcerated women would collapse. A sizable number of states, perhaps a majority, would likely ban abortion for all female inmates, including pretrial detainees who haven’t been convicted of a crime.

Congress could also outlaw abortions for federal prisoners and ICE detainees. If Congress didn’t act, the executive could step in and promulgate a federal rule prohibiting abortion for anyone in federal custody. That, after all, is what the Trump administration has already done for pregnant unaccompanied, undocumented minors like Jane Doe—crafting guidance that fully forbids these women from accessing abortion. With Casey out of the picture, the administration could dramatically expand this policy in the interest of “promoting fetal life and childbirth over abortion.”

And it would all be perfectly legal. If the court killed Casey, then the government would have a presumptive right to proscribe abortion altogether. It could certainly forbid abortion for prisoners and detainees. (There are about 200,000 imprisoned women in the United States and thousands more in immigration detention centers.) These abortion bans would not even implicate Turner, which applies only when prisons limit inmates’ constitutional rights. If abortion is not a constitutional right, then prisons can undoubtedly prohibit it.

When Americans discuss abortion rights and the end of Roe, we frequently focus on the patchwork of laws that would drive many women far out of their home states to terminate their pregnancies. But the Jane Doe case demonstrates that one vulnerable group of women would immediately be stripped of agency over reproduction. With Roe and Casey on the books, the Trump administration was able to halt abortions for an entire class of women. Without a constitutional right to abortion, all women in custody could be forced to carry pregnancies they do not want—then have their children taken away from them while they serve out their sentences or face deportation. By forcing Doe to remain pregnant against her will, the government offers us a glimpse of one possible future for thousands of women in America.