For 18 months, lower federal courts have winked and nodded at a dubious, dilatory lawsuit intended to block President Trump’s proclamation banning travel to the U.S. from a handful of countries that have massive internal problems with Islamic terrorism.

It took a Supreme Court ruling, unfortunately a narrow 5-4 ruling along partisan lines, to reaffirm what should have been obvious to everyone from the beginning: presidential powers are presidential powers, no matter who is president.

Is the travel ban, which its opponents disparage as a “Muslim ban,” a smart policy? Does it keep anyone safe? The only answer a court can give to that is, it doesn’t matter. Courts don’t create our immigration or security or foreign policy. Nor should they. Congress does, and Congress handed immense powers to the president to exclude foreigners.

Presidents often try to stretch their powers. But this is very clearly not one of those cases. When Congress passed the Immigration and Nationality Act, it gave every president power that goes beyond what presidents can do on most mere domestic questions. The language in the law could not be any clearer than it is:

“Whenever the president finds that the entry of any aliens or of any class of aliens into the United States would be detrimental to the interests of the United States, he may by proclamation, and for such period as he shall deem necessary, suspend the entry of all aliens as immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate.”

Pretty straightforward.

Until Congress changes this language, Trump and every president who follows him will have this same authority. What’s more, no president can forfeit this or any other legitimate presidential power by virtue of statements he makes on the campaign trail. He retains the powers Congress gave over immigration, with all the consequences that follow.

This is why Chief Justice John Roberts wrote for the majority that Trump’s travel ban proclamation “is squarely within the scope of presidential authority under the INA.” Neither of the dissents written by the liberal justices in this case, he added, tried in any serious way to argue otherwise. Instead, they argued that the policy is unwise, ineffective, overbroad, et cetera. But to allow courts to make such judgments about what is fundamentally a foreign policy and national security question is wildly inappropriate.

If Congress gave the president too much power over immigration, Congress has to take it back. Contrary to the impression left by decades of liberal judicial activism, there is no shortcut for winning the power to govern one's fellow men. Courts cannot settle the question of how immigration policy should work without trampling on all kinds of political questions that rightly belong to the elected branches.

For example, would anyone who hotly debated President Barack Obama’s Iran deal, for or against, be comfortable with justices sitting in judgment over its wisdom or its effectiveness as foreign policy? Would anyone brook the idea of suing to overturn a presidential veto on the grounds that the president cast it from nefarious motives? That is where the argument against respecting clearly enumerated presidential powers leads you. It’s no way to run a country.

Presidents are at times sued for violating rights when they enforce laws. Congress is often overturned for creating laws that violate rights. But when presidents faithfully execute laws to the letter that all parties agree are constitutional, as in this case, courts have no place second-guessing their judgment.