For at least a while longer, women can get an abortion at the last clinic performing that procedure in Missouri.

Exactly how long a while is, no one knows. And naturally, that uncertainty is stressful for patients, their families and, yes, their doctors. But legally, it’s hard to see how the federal judge who blocked a portion of Missouri’s extreme new abortion law could have done otherwise.

On Tuesday, U.S. District Judge Howard F. Sachs issued a temporary restraining order that puts most of the state’s new abortion ban on hold pending the final ruling that’s expected in several months. The part of the law that would ban any abortion performed at or after eight weeks of pregnancy will not go into effect for now. The law contains no exception for rape or incest.

But the law’s ban on any abortion being performed solely because of the fetus’ race, sex or potential Down syndrome was still to go into effect on Wednesday. In his opinion, Sachs said that ultimately, a ban on all abortions performed eight weeks after a woman’s last menstrual period will almost certainly be found unconstitutional, as every ban based on gestational age has been, right up to the time of fetal viability.

In fact, both pre-viability time limitations and anti-discrimination provisions “have been uniformly rejected by federal courts,” Sachs wrote, adding that “granting this motion in large part,” though not completely, “is required by law.” The state, of course, is trying to get the U.S. Supreme Court to overturn the precedents that bar pre-viability bans.

Sachs rejected Missouri’s argument, made by State Solicitor General John Sauer in a Monday hearing, that only patients — not their doctors or advocates — even have the standing to sue, or to claim that their rights are being violated. The Supreme Court ruled otherwise in 2006, Sachs said, in Ayotte v. Planned Parenthood of Northern New England.

Still, another aspect of the decision was a harder call, he said.

“The most challenging and novel of the issues in this case,” Sachs wrote, “is the state’s attempt to prohibit all abortions for special reasons that are deemed contrary to public policy. For present purposes I assume that almost everyone in our culture would be appalled by a pregnant woman’s abortion of a fetus identified as female because the woman or the family prefers that she give birth to a boy. The legal issue is whether the public, through legislation, has a right to intervene and prohibit such a discriminatory or ‘selective’ abortion” before viability.

The Supreme Court has not decided this issue and does need to clarify it.

The high court decided not to review an Indiana law that included similar discrimination provisions, but Justice Clarence Thomas wrote that we should prevent abortion “from becoming a tool of modern-day eugenics” used to select for race, gender or ability. This does present a genuine moral quandary, and raises questions that need to be decided.

Sachs reasons that allowing the discrimination provisions to go into effect for a few months won’t have much real-world impact because doctors don’t currently ask patients why they’re getting an abortion.

“Caution suggests I withhold” a preliminary injunction against the discrimination provisions of the law, he said. But Sachs also said he remains open to “an adequately supported renewed motion on this narrow issue.”

No doubt he’ll get one.