In early July, a U.S. District Court judge in Hawaii held that the federal government must ease new immigration controls it implemented in response to the Supreme Court’s recent Trump “travel ban” decision. That decision allows the implementation of parts of the temporary moratorium on travel from certain countries with ties to terrorism. It also highlights why the Supreme Court must keep to its constitutional role of interpreting the law, in order to avoid creating confusing new legal standards.

In, a preliminary ruling on Trump v. International Refugee Assistance Project, the Supreme Court held that aliens with a “credible claim” to a “bona fide relationship” with “a person or entity” in the United States can not be denied admission to the United States. However, the bona fide relationship requirement is utter nonsense. The Immigration and Nationality Act of 1965 (INA) governs immigration to the United States. Nowhere in any of the thousands of pages that make up the INA does it say that anyone with a bona fide relationship to a person or entity in the United States must be let into America.

With the exception of U.S. citizens, no one seeking to enter the U.S. has an unfettered right to be admitted. Per the terms of the INA, all those seeking entry must prove to the satisfaction of U.S. Customs and Border Protection (CBP) that they are admissible to the United States. Documents provided by U.S. Citizenship and Immigration Services (USCIS) and the Department of State (DOS) are evidence of admissibility. They are not a guarantee of anything. Even green card holders may be denied entry to the U.S. if they have violated the terms of their status. So, the Supreme Court seems to have pulled out of thin air an entirely new standard for admission to the United States.

In so doing, it has placed CBP in the unenviable position of risking contempt of court just for doing its job well. It has also transferred the decisions regarding who should be allowed into the U.S. from the hands of the roughly 60,000 highly trained immigration specialists at the Department of Homeland Security and DOS, into the hands of a few unelected federal judges with negligible immigration experience.

A full hearing on this case should be held in late October. Until then, the Supreme Court may have been trying to “split the baby,” by formulating an extra-statutory standard for applying the interim version of the moratorium. However, the Court made a grievous error. Justice Thomas acknowledged this, calling the Court’s formulation an “unworkable remedy” that invites additional litigation. And the decision has created a disconcerting situation in which the national security interests of Americans are being subordinated to extremely vague legal entitlements allegedly held by foreigners with insignificant, if any, ties to the United States.

When the Supreme Court finally decides this case on the merits, it should adhere to the 150 years of clear precedent holding that the courts are ill suited to controlling our borders. Otherwise, the United States will wind up a borderless nation without the tools to defend itself against foreign intelligence agents, terrorism, and transnational crime.