The 1882 Supreme Court C.M. Bell / Library of Congress / Corbis / VCG / Getty

I haven’t been able to find out when or where Chae Chan Ping died. American history records that this Chinese laborer was expelled from the United States—despite a written promise from the U.S. government that he would not be—on September 1, 1889. After that, he vanished. But his ghost haunts American immigration law, and the U.S. Supreme Court, more than 125 years later.

As Michael Kagan of the University of Nevada, Las Vegas School of Law pointed out in a recent article in the Nevada Law Journal Forum, Chae’s ghost most recently reappeared with the advent of President Trump’s travel ban.

In fact, Chae Chan Ping is now a ghost within a ghost, since the ban itself has taken on a kind of spectral quality, the Flying Dutchman of constitutional law—withdrawn once, rewritten twice, enjoined three times by lower courts, at least temporarily revived in December by the Supreme Court; it remains in the strange legal bardo between life and death. The Supreme Court has allowed it to go into effect before it hears the final appeals; on Friday, the Supreme Court agreed to review the Ninth Circuit’s latest decision striking down the third iteration of the ban. (As of this writing, the Fourth Circuit has not rendered its ruling in the companion case.)

Chae Chan Ping’s name doesn’t appear in either the government’s petition for review or the state of Hawaii’s reply, but his ghost haunts the pleadings.

His ghost can be heard, also, in Trump’s recent suggestion that the United States should bar immigration from African countries and Haiti in order to substitute immigrants from Norway, or when government lawyers argue that the constitutional rules against decisions based on race, national origin, and even religious discrimination simply do not apply to immigration matters, and that courts may not meddle in immigration matters

Lawyers call that the “plenary power” doctrine. In 1977, the Supreme Court stated it thus: “‘Over no conceivable subject is the legislative power of Congress more complete than it is over’ the admission of aliens.” Thus, the Court said in 2003, “Congress may make rules as to aliens that would be unacceptable if applied to citizens.”

How did we get here? Chae Chan Ping came to the U.S, legally, in 1875 to work as a laborer in San Francisco. At that time, the U.S. by treaty guaranteed to Chinese people the “natural right” to immigrate to the U.S., though not to become naturalized citizens.

After 12 years, he returned to China for a visit in June 1885. By that time, the political winds had turned against the Chinese; in 1882, Congress passed the Chinese Exclusion Act, barring new immigration by Chinese people. Its first version, however, allowed Chinese already present in the U.S. to remain, even if they returned home for an occasional visit. Before Chae Chan Ping left for China, he followed that law carefully, obtaining from the government a certificate stating that he lived in the U.S. and was legally entitled to return. He sailed off to Hong Kong on the steamer Belgic, and returned more than a year later on the same vessel. But while he was on that homeward voyage, Congress tightened the screws further. As of a week before his arrival, certificates of return were rendered void. Customs officers at the port of San Francisco refused to allow him back into the U.S.

As outlined in a readable summary by the University of California Davis law professor Gabriel J. Chin, Chinese benevolent societies had amassed a legal-defense fund for immigration cases. Thus, Chae Chan Ping’s appeal to the Supreme Court was brought by a “‘Dream Team’ of elite lawyers.” They argued that the certificate granted him a vested right to return, and that revoking that right would be a taking of property without due process. They did not argue that Congress could not exclude new immigrants from China; indeed, they wrote in their brief, “we do not deny the plenary power of Congress over the treaty and over its own legislation so as to forbid the future immigration of Chinese laborers, and the future issue of certifications…”

But when the Supreme Court rejected the petition, it did so in terms much broader than needed to resolve the certificate dispute:

To preserve its independence, and give security against foreign aggression and encroachment, is the highest duty of every nation, and to attain these ends nearly all other considerations are to be subordinated. It matters not in what form such aggression and encroachment come, whether from the foreign nation acting in its national character, or from vast hordes of its people crowding in upon us. The government, possessing the powers which are to be exercised for protection and security, is clothed with authority to determine the occasion on which the powers shall be called forth; and its determinations, so far as the subjects affected are concerned, are necessarily conclusive upon all its departments and officers. If, therefore, the government of the United States, through its legislative department, considers the presence of foreigners of a different race in this country, who will not assimilate with us, to be dangerous to its peace and security, their exclusion is not to be stayed because at the time there are no actual hostilities with the nation of which the foreigners are subjects.

This language, and similar language in two other “Chinese Exclusion” cases, Fong Yue Ting and Nishimura Ekiu, is the foundation of the “plenary power” doctrine. The words are confusing, but they can be read to suggest that foreign immigrants, even if civilians and even if legally admitted, are a military danger over which the federal government has total control; that the power to exclude them is so basic to nationhood that the Constitution cannot limit it; and that a restriction, even a total ban, on any basis is beyond question by the courts. None of these questions was actually raised by the cases.

As Chin points out, these cases were a product of the era of Plessy v. Ferguson and legal segregation (a majority of the Chae Chan Ping Court was still on the Court when Plessy was decided seven years later). But the cases—apparently—remain good law, and they embody the idea that Congress can do anything it wants in immigration, Constitution be damned. In 1950, the Supreme Court relied on the Chinese Exclusion Cases when it wrote that “the exclusion of aliens is a fundamental act of sovereignty. The right to do so stems not alone from legislative power but is inherent in the executive power to control the foreign affairs of the nation.” Three years later, it again cited Chae Chan Ping for the principle that excluding aliens—even those who had lived for decades in the U.S.—was “a fundamental sovereign attribute exercised by the Government’s political departments largely immune from judicial control.”

That vision of the immigration power reminds me of the old George Carlin routine in which a schoolboy tries to puzzle the priest by asking, “If God is all-powerful, can he make a rock so big that he himself can’t lift it?”

Under “plenary power,” have the people of the United States created a kind of superlegal golem, with powers neither created nor limited by their own fundamental law?

The Court cited Chae Chan Ping a dozen times between 1945 and 1977, but only once in the past 40 years—oddly enough, in that case, as evidence that “[the plenary] power is subject to important constitutional limitations.”

In other words, Chae Chan Ping has become a kind of crazy uncle in the constitutional basement, to be ignored if possible and explained, if necessary, only in the vaguest terms. In that, it is much like Korematsu v. United States and the other Japanese Internment Cases. Those cases approved the wartime roundup and imprisonment in camps of Japanese immigrants and American citizens of Japanese ancestry. Since then, the U.S. admitted it provided false evidence to support the internment; a district court expunged Korematsu’s conviction because the government lied in his case; Congress voted to compensate the survivors; and President Ronald Reagan apologized for the internment.

But the case has never been overruled; it survives as a grin without a cat, an emergency power in search of an emergency. As Justice Robert Jackson wrote at the time, the precedent “lies about like a loaded weapon ready for the hand of any authority that can bring forward a plausible claim of an urgent need.” The ghost of Korematsu has come out of the attic recently, as American leaders begin to talk seriously about camps and roundups and mass deportations. So, too, has the ghost of Chae Chan Ping, in the administration’s legal claims that Trump’s preferences as to immigrant streams may not be reviewed by the courts.

The Court’s reticence about these cases, UNLV’s Kagan explained in an interview, comes out of “a kind of dance between the branches [of government]—not closing doors all the way, with an understanding that there will be some discretion by the other branches. But discretion is not what we have come to expect from the Trump administration.”

Chin, of UC Davis, told me that “there is no question that the ghost of the Chinese Exclusion cases haunts the travel ban case and the travel ban policy. The courts have to figure out if these century-old cases are still good law, and the country has to figure out if our discriminatory immigration policy dating back to 1790 is consistent with our current values.”

The Court is likely to decide this case without explicitly reaching that issue. But judicial decisions, like magic spells, often summon powers that transcend the words they use. We will get a travel ban decision soon, perhaps by summer. That opinion may give a hint whether Chae Chan Ping’s ghost haunts us still, or whether this mistreated laborer can finally take his rest.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.