It seems likely that the oral argument before the U.S. Supreme Court on November 9 will interest immigration specialists but not the public at large. The issue—whether Congress can discriminate against U.S. citizen fathers in awarding citizenship to foreign-born children—is, for most people, pretty obscure.

But if the evening of November 8 has ended in a surprise, Lynch v. Morales-Santana may draw a lot of sudden attention. Observers will scan it closely for signs of the Court’s attitude toward President-elect Donald Trump’s plans to “shut down” Muslim immigration to the U.S.

That constitutional question has hovered uneasily in the background throughout the campaign. A “Muslim ban” would certainly be unwise and un-American. But would it be unconstitutional?

In any other area of government policy, the answer would be somewhere between “yes” and “hell, yes.” For the U.S. to discriminate so baldly by religion against anyone in the country—citizen or alien, documented or undocumented—would a gross violation of the principle of equal protection, which applies to the federal government by virtue of the Fifth Amendment.

But immigration law is, in many ways, a constitution-free zone, governed by what the Supreme Court has called “the plenary power of Congress” over decisions of who may enter the U.S. and who may not.  The “plenary power doctrine” essentially holds that Congress can make distinctions among immigrants—including some based on sex, race, and national origin—that (as the Court said in 1976) “would be unacceptable if applied to citizens.” Thus, the Court’s approach to this issue might give a hint about how the justices would react to a statute—or a Trump executive decision––banning Muslim immigration to the U.S.

The term “plenary power doctrine” arises from the Hobbesian view of the world that dominated the Court during the late 19th Century. At that time, the United States was slouching toward world empire while dealing with a flood of immigration from both Southern Europe and China. Until the 1880s, the Court had treated immigration laws they way it treated regulations of interstate and foreign commerce—that is, as subject to the same constitutional limits as any other federal law.

But now, as my University of Baltimore colleague Matthew Lindsay has written, the Court transformed congressional power over immigration “into a power of national self-defense derived from the nation’s inherent sovereignty.” In the chillingly named Chinese Exclusion Case, Justice Stephen Field said that the government must “give security against foreign aggression and encroachment,” whether it came “from the foreign nation acting in its national character, or from vast hordes of its people crowding in upon us.”

The Constitution, cases like this suggest, may be a nice rulebook at home. But the federal government must have full (“plenary”) power to close its borders, without any hand-wringing about the rights of foreigners.

The politics of that period has some echoes in this one. But the Court has so far proved less susceptible than its predecessor to the outright xenophobia of measures like Arizona’s “show me your papers” law, key elements of which it struck down in 2012. This brings us to the case of Luis Ramon Morales-Santana. The United States wants to send Morales to the Dominican Republic, where he was born. But Morales insists that he is a U.S. citizen by birth. He challenges the statute that denies citizenship to him, because it discriminates by sex against his father.  

The father, Jose Morales, was born in Puerto Rico in 1900. In 1919, Jose left Puerto Rico to work for a U.S. sugar company in the Dominican Republic. He was just three weeks shy of his nineteenth birthday.

Those three weeks have become important to his son. Luis was born in Santo Domingo in 1962 to Jose and his Dominican wife. When Luis was eight, his parents married—thus, in legal terms, “legitimizing” Luis, creating a legal father-son relationship. In 1975, 13-year-old Luis came to the U.S. legally with his father. He has lived here since then.

In 1995, he was convicted of robbery, burglary, and attempted murder; the Immigration and Naturalization Service began proceedings to deport him to the Dominican Republic. Luis, however, now argued that he was a U.S. citizen by virtue of his father’s citizenship.

There is no question that Jose Morales was a citizen when Luis was born. There is no question that Jose Morales legally recognized Luis as his son. However, Jose was not married to Luis’s mother when Luis was born. The Immigration and Nationality Act of 1952—which was in effect when at that time—made a pretty sharp distinction between two types of “illegitimate” children. It treated some children of unwed American fathers on the one hand much more harshly than children of unwed citizen mothers on the other.

Briefly put, if an unmarried American woman gave birth abroad to a child fathered by a non-citizen, she could pass her citizenship to the child—as long as she had lived in the U.S., at any point in her life, for one full year. On the other hand, if an American man fathered an out-of-wedlock child with a non-citizen mother, the child could become an American citizen only if 1) the father legally recognized his paternity and 2) the father had lived in the U.S. for a total of 10 continuous years before the child’s birth.

And here’s the kicker—five of those 10 years had to be lived after the father’s fourteenth birthday.

In other words, a man might be born in the U.S., and might live here without ever leaving, for 18 years and 364 days—but if he left the country the day before his nineteenth birthday, met a woman abroad, and fathered a child out of wedlock, he could not pass on his birthright citizenship to his “illegitimate” child. That would be true even if he raised the child himself, and even if he legally recognized the child as his.

And remember, this is precisely what happened to Luis Morales-Santana. Jose Morales, born in the U.S., lived there until three weeks before his 19th birthday. His work then took to him the D.R. He “legitimated” Luis—but he still was three weeks short of the magic five post-14 years. As a result, his son was permanently barred from citizenship at birth, though other children born to mothers with much less connection to the U.S. received it with no trouble.

This is the issue in Morales-Santana. If a government policy inside the U.S. made such an arbitrary sex distinction, it couldn’t survive judicial scrutiny for 10 seconds. If the principle of equal protection applies to citizenship matters at all, it certainly would seem to apply here.

At first glance, though, Luis’s case seems like an uphill struggle. As recently as 2000, in a case called Nguyen v. Immigration and Naturalization Service, the Court approved a seemingly similar sex-based citizenship distinction. Tuan Nguyen, the petitioner in that case, had been born to a U.S. citizen father in Vietnam. Tuan came to the U.S. as a refugee; abandoned by his mother, he grew up in the U.S. with his biological father.

However, the immigration statutes said that he could not be a birthright citizen unless his father had legally “legitimated” him before his 18th birthday. Tuan’s father had raised him, but hadn’t taken legal steps to recognize him as his son.

In an opinion by Justice Anthony Kennedy, the Court rejected Nguyen’s petition. But, importantly, the Kennedy’s opinion explicitly refused to reaffirm the “plenary power” of Congress. The opinion did not specify whether “deferential” review, or ordinary equal-protection standards, applied. Even under ordinary equal-protection review, this sex discrimination passed muster, Kennedy wrote. The statute treats male citizens differently from female ones, the opinion said, but that difference “substantially” advanced two “important governmental objectives.”

These interests were: “assuring that a biological parent-child relationship exists” and requiring that father-child relationships are also “real, everyday ties that provide a connection between child and citizen parent and, in turn, the United States.”

Biological relationship was easy to tell when the citizen is the mother; the court dryly noted that a mother “is always present at birth,” while a father may not be. “Legitimation” would recognize the blood tie with the father, and would also demonstrate that the father had that “real, everyday tie.”

Unlike in Nguyen, Morales argues, the “physical presence” rules at stake in this case don’t have any relation to those two “important” interests. Remember that Jose Morales had done everything the statute would require of him—by marrying Luis’s mother, he had legally established legal paternity; he had also raised Luis as his legal son in the U.S. Blood and national ties were established.

But none of that does Luis the slightest good—because his father, born in the U.S., lived in the U.S. for a “mere” 18 years and 49 weeks and left it four decades before Luis was born. That “mistake” had no bearing on the relationship between father and son, or between either of them and the United States. The statute seems like a naked discrimination. Female citizens with one years’ residency passed their citizenship at birth; male citizens only did so if they pass a residency requirement that is not only onerous but literally impossible for an 18-year-old father to fulfill.

Morales argues that the distinction is based on the old stereotype that only unwed mothers participate in raising children. The government defends the law on the grounds that, when it was passed in 1952,  “most countries considered the mother of a child born out of wedlock to be the child’s only legally recognized parent at birth.”

An amicus brief filed by a group of historians points out the obvious: “many of those laws were informed by impermissible gender-based beliefs about men as fathers, thus violating the equal protection and due process rights of unmarried fathers and their children.”

Current immigration law, by the way, contains a similar sex distinction, requiring five years’ physical presence for unwed fathers, with two over the age of 14; one year, at any point, for the unwed mother. So the case is of more than historical interest.

In order for the government to prevail, the Court must either reaffirm “plenary power” (opening the door for racial or religious distinctions) or hold that this seemingly arbitrary gender discrimination passes equal protection muster.

“Extending deference to Congress to allow it to discriminate in citizenship laws would drill a hole in the heart of the Equal Protection Clause,” argues Martha F. Davis of Northeastern University School of law, who argued Nguyen in front of the Supreme Court.

Regardless of the presidential election result, a true “Muslim ban” seems unlikely (Trump has already said it has “morphed” into “extreme vetting”). But a victory for Luis Morales-Santana would make it even less likely.