President Trump plans to release a revision of his immigration executive order on Muslim‐​majority countries next week. If the new order bans new immigrants from certain countries again, it is certain to land back in court. Last time this happened, his lawyers defended him by asserting that courts have no role in “second‐​guessing a formal national‐​security judgment made by the President.”

But by not second‐​guessing Trump, courts will instead have to second‐​guess the security judgment of Congress, which believed nationality‐​based discrimination would harm U.S. security and so banned it.

In 1952, Congress enacted the Immigration and Nationality Act, skewing immigration quotas to the benefit of Western Europe while barring most Asian and African immigrants. It also implemented a provision allowing the president to exclude people he deemed “detrimental” to the United States. Trump is claiming to assert this authority now.

But in 1965, Congress amended the 1952 law, creating a new system under which each country was guaranteed an equal shot at the annual immigration quotas. It also enacted a provision that banned discriminating against immigrants applying to live here permanently “because of the person’s race, sex, nationality, place of birth, or place of residence.”

This is the exact type of discrimination that Trump is now defending. And although Trump claims that courts have no role in foreign policy, foreign policy was a significant motivation for Congress amending the 1952 law.

In his message to Congress requesting the passage of the 1965 amendment, President Lyndon Johnson said that the unequal treatment impeded “the success of our foreign policy.” Then‐​Secretary of State Dean Rusk told Congress that it was “indefensible from a foreign policy point of view,” adding that “the Chinese are now in Africa saying, ‘You can’t expect these whites of Europe and of North America, particularly the United States, to be your friends.’”

Congress agreed. As then‐​New York Sen. Jacob Javits stated, nationality‐​based immigration was “a target of Communist propaganda making our effort to win over the uncommitted nations more difficult.” Over in the House, Rep. Seymour Halpern argued, “When we are trying to demonstrate the nobility of our cause to the peoples of eastern and southern Europe, it is unconscionable to open our door to others and close it to them.”

These arguments apply in equal force today. The United States needs allies within these Muslim‐​majority countries, and banning all immigration from them has been just as much a propaganda tool for radical Islamists as it was for the communists. After the ban was announced, Iran’s extremist leader Ayatollah Ali Khamenei said he was “thankful” that Trump “showed the real face of America.” ISIS’ allies on social media are already promoting the same message.

Trump argues that there should be an exception to the non‐​discrimination rule for countries where people are difficult to screen. He has said that Syrian refugees represent “the all‐​time great Trojan Horse” to bring down our country. Opponents of the 1965 act made the same claims. While testifying, one opponent even used his exact language, calling the bill a “Trojan Horse wherein the enemies of our way of life are willingly brought within our walls.”

Rep. O.C. Fisher of Texas detailed the argument for discrimination that the Trump administration has chosen to use: “The problem of procuring background information to screen out subversives becomes increasingly difficult” in Asian countries, he said, because “most of the background information regarding Communist activities would be located in oriental Communist countries; and hence unavailable to our security officials.”

Proponents of the bill brushed off these concerns. “Applicants still have to be screened,” Illinois Sen. Everett Dirksen responded. “There is still power in American consular offices in every part of the world to look a person over, to look his application over, and to determine whether he fits within the frame of the pending bill.”

This same power exists today. But it cannot be used in a discriminatory manner, and there is no emergency that justifies the President ignoring the law. The current vetting process has not allowed any deadly attacks by immigrants from these banned countries, and the Trump administration has failed to produce any evidence that future attacks are likely, specifically saying that the courts have no business even asking this question.

Yet it was Congress that considered and rejected the same security argument Trump is now making. For the President now to assert that foreign policy reasoning allows him to ignore the plain meaning of the 1965 law is an outrageous usurpation of Congress.

The courts should continue to stand in his way, not because a judge knows the best foreign policy, but because in America, Congress makes the laws.