Nearly 23 years ago, Justice Ruth Bader Ginsburg issued a landmark decision invalidating the Virginia Military Institute’s exclusion of women as a violation of equal protection. The ruling in United States v. Virginia compelled the United States’ last all-male public university to accept women, who quickly proved themselves to be worthy cadets. But as every adult man in the U.S. knows, sex discrimination in military service remains: Upon their 18th birthday, American men must register for the selective service, while women are exempt. How, almost 23 years after the VMI decision, can this flagrant inequality persist?

On Friday, a federal judge in Texas provided an answer: It can’t. In a brief but emphatic decision, U.S. District Judge Gray H. Miller ruled that the Selective Service System may not constitutionally direct men to register as part of its draft requirements while excluding women. Miller’s decision closely tracks Ginsburg’s gradual development of the law toward ever-greater gender equality. While the outcome might seem startling, the logic is carefully anchored in precedent. It would be difficult if not impossible for the Supreme Court to reverse Miller’s ruling without simultaneously eroding decades of sex discrimination jurisprudence. Under any plausible interpretation of today’s equal protection principles, the men-only selective service has got to go.

As Miller acknowledged, the Supreme Court has evaluated the United States’ discriminatory draft process before, in 1981’s Rostker v. Goldberg. Back then, the court affirmed the constitutionality of the Selective Service System’s exclusion of women—but it did so for a very specific reason. The majority noted that the purpose of mandatory registration was to prepare combat troops in case of war. And in 1981, female troops were excluded from combat. Due to these “combat restrictions on women,” the court wrote, men and women “are simply not similarly situated for purposes of a draft or registration for a draft.” As a result, women’s exclusion from the draft raised no constitutional concerns.

It is hard to defend a men-only draft under this stringent rule.

Since then, however, the law has changed: In 2015, the Department of Defense opened all combat roles to women, permitting them to become Army Rangers, Green Berets, Navy SEALs—anything a man could be. While the Trump administration has attempted to undermine female troops’ right to serve in combat roles, it has not reversed this rule. The question, then, is whether Rotsker’s holding can still stand when the facts underpinning it have changed so dramatically.

To Miller, the answer is clearly no. Citing Ginsburg’s Virginia opinion, Miller explained that gender discrimination must be “substantially related” to “important governmental objectives” to pass constitutional muster. Moreover, its justification “must be genuine, not hypothesized or invented post hoc in response to litigation. And it must not rely on overbroad generalizations about the different talents, capacities, or preferences of males and females.”

It is hard to defend a men-only draft under this stringent rule; after all, women were formerly excluded from combat on the basis of tired stereotypes about the weakness of their sex. But Virginia did not purport to overrule Rotsker, which was decided 15 years earlier. Why, aside from the recent changes to combat roles, has this challenge arrived now, nearly 23 years after the VMI ruling?

The answer lies in another, more recent Ginsburg decision: 2017’s Sessions v. Morales-Santana. That case involved a discriminatory immigration law that made it easier for unwed mothers to pass along American citizenship to their children than unwed fathers. In striking down the law, Ginsburg further sharpened the test she laid out in Virginia. A gender classification, she held, may not be justified by past practices and beliefs. Instead, it “must substantially serve an important governmental interest today,” for the court has “recognized that new insights and societal understandings can reveal unjustified inequality … that once passed unnoticed and unchallenged.” This standard comes from Obergefell v. Hodges, which legalized same-sex marriage nationwide.

By importing Obergefell’s sweeping endorsement of forward-looking equality into sex discrimination cases with Morales-Santana, Ginsburg changed the game. She forced courts to look at the facts on the ground “today” to determine whether government-mandated gender inequality infringes on equal protection. And that’s exactly what Miller did, citing Ginsburg’s quote from Morales-Santana to clarify that even if a gender classification “served an important interest in the past,” shifting laws and social norms have rendered it unconstitutional now. Rotsker rested upon the fact that women could not serve in combat, and the draft was meant to prepare combat troops. In 2019, women can serve in combat. So it no longer makes sense to exclude them from the draft.

To try to get around this problem, the federal government mounted two bizarre arguments. First, it hypothesized that if the Army subjects women to the draft, it will increase the perception that women may be forced to serve in combat roles. In response, fewer women will voluntarily enlist in the military. This argument is impossible to take seriously. As Miller wrote, it “smacks of ‘archaic and overbroad generalizations’ ” and was “created for litigation” with no basis in reality.

The government’s second argument is a tad stronger: It claims that few women drafted will be fit for combat. Is that true? Who knows? There is no evidence that Congress actually gauged whether women would be disproportionately unable to serve in combat, as compared with men, when excluding them from the draft. Instead, Miller wrote, Congress “obliquely relied on assumptions and overly broad stereotypes about women and their ability to fulfill combat roles.” And hypothetical concerns about female frailty cannot justify sex discrimination under the equal protection principles enshrined by Ginsburg.

In his decision, Miller declined to remedy the draft’s legal flaw immediately. (That’s typical for a major ruling that upends long-standing practice, as the government will undoubtedly appeal.) There is a decent chance that the highly conservative 5th U.S. Circuit Court of Appeals will reverse Miller.

But as Ilya Somin writes in Reason, it would be tough for the Supreme Court to let such a ruling stand. The men-only draft runs afoul of fundamental constitutional guarantees consistently safeguarded by SCOTUS. Permitting such rank, baseless sex discrimination would set gender equality jurisprudence back decades. Ginsburg’s stark rejection of the “gender line” in Virginia and Morales-Santana remains good law today. If the Supreme Court heeds it, the justices will be obliged to affirm Miller and halt the government’s condescending exclusion of women from the draft.