In the past week, President Donald Trump issued three Executive Orders (EOs) dealing with the status of immigrants and refugees in the United States. The first EO announced that it will deny federal funding to any sanctuary city, or city that refuses to cooperate in the deportation of illegal immigrants in the United States. The second EO declared the intention to build a wall to keep illegal immigrants from Mexico from coming into the United States. The third EO has three components: The first part bars indefinitely all Syrian refugees from entering the United States; the second suspends all refugee admissions for 120 days; the third blocks citizens from Iran, Iraq, Libya, Somalia, Sudan, Syria, and Yemen, whether refugees or not, from entering this country for a period of 90 days. Parts of this order will remain in place until the government devises, in Trump’s own words, a program of “extreme vetting” of immigrants.

Of these, the ill-timed and stealth immigration and refugee order is by far the worst because it was imposed immediately, without warning or consultation, and hits hard at people who happen to be abroad—although now it appears, after some confusion, that the order does not apply to permanent residents, who may face extra scrutiny at airports, but are not categorically barred. Nonetheless the stories are legion of “scientists, business travelers and grandmothers” held in limbo by the new rules. The dislocations have prompted a massive outcry, not only from progressives, but also from classical liberals like myself who think of themselves as part of the loyal opposition. Indeed, the refugee and immigration order has already given rise to a class action challenge to the law, and to a decision by Judge Ann Donnelly of New York that blocked, at least temporarily, U.S. immigration authorities from forcing incoming refugees back home on the ground that deportation would cause them irreparable injury. At this writing, similar orders have been issued in Boston, Seattle, and Virginia. President Trump, largely oblivious to the chaos and protests, observes that the ban was “working out very nicely,” but “it’s not a Muslim ban.”

Clearly, Trump’s inflammatory campaign rhetoric was not for show. For better or worse, the President meant every word he said, and therein lies the source of the problem. The ostensible justification for these orders is the promotion of national security, an end whose legitimacy no sane person would dispute. But the question is—what means should be used to achieve that end? As is the case of all government actions under conditions of uncertainty, it is necessary to balance the risks of two kinds of error. The first facilitates the entry of people into the United States who ought not to be here. The second excludes entry from the United States of people who should be here. The President is right to note the high stakes of any terrorist attack. But he shows his blindness by trying to keep out people who should, by any standard of moral decency or economic self-interest, be allowed in. In my view, the obvious danger in these situations is transient gains at unacceptable political, moral, and social costs.

The first element to be considered in any grand reorganization of American immigration and refugee policy is the level of terrorist risk posed by new entrants. On this score, a 2016 Cato Policy Analysis on terrorism and immigration shows the debate is highly skewed by the outlier of the 9/11 attacks. It is of course imperative to take some steps to deal with these issues, but a wholesale ban seems to be wildly overbroad given the multiple ways in which home-grown terrorists could seek to implement similar plans, perhaps even in response to this order. It is ironic that most of the terrorists responsible for 9/11 were Saudis not covered by the ban, while other terrorist actions were committed by persons from Chechnya or Pakistan, neither of which were covered by the ban. It appears that only 11 out of 180 terrorists since 9/11 came from the countries covered in the President’s EO. Citizen attacks were far more common. What’s more, the incidence of terrorism from refugees in the United States is less than one in 3.64 billion per year, and it is even smaller for illegal immigrants, at one in 10.9 billion per year. The decision, therefore, to order an indefinite suspension of entry of persons from Syria denies refuge to persons who are at greatest risk. In addition, it is unclear what gain there is to apply the refugee ban to people born in these countries who have for years been dual nationals, traveling on British or Canadian passports.

Trump uses exaggerated rhetoric when he cries out “we don’t want ‘em here,” referring to radical Islamic terrorists. Sadly, his proposal does nothing to respond to the homegrown terrorist threats that could increase as a result of the obvious anti-Muslim tone of these orders. It is good that Christians from the seven targeted nations may well be allowed in, but it is dangerous, even scandalous, to keep Muslims out when they have also been persecuted. It is doubly so for those who aided the United States in its own war efforts in the Middle East. Trump speaks as if the only people who will be kept out are “foreign nationals who intend to commit terrorist attacks in the United States.” But sadly, his position exposes innocent people to a heightened risk of terrorism in their home countries.

The case is every bit as weak for the President’s order to build a nearly 2,000-mile wall with Mexico, and then seek to charge the costs back to that country. Illegal immigration from Mexico has been down, not up, in recent years, as better conditions in Mexico (and worse ones in the United States) have led to a decline by about 58 percent between the 2003-2007 period and the 2008-2012 one. Why these numbers portend some crisis that justifies the construction of a leaky wall that one can dig under, fly over, or walk through on a visa is beyond comprehension.

And the thought that Mexico can be bullied into paying for the wall is a political delusion, backed by faulty economic analysis. A 20 percent tariff on Mexican goods, which the White House has floated, ignores the simple fact that some portion of that tariff is passed back to American citizens in the form of higher prices, assuming they can afford to buy these goods at all. It is also blind to the risk of retaliation that Mexico could impose on American efforts to sell or travel to that country. Right now, the President’s pro-growth domestic program has boosted the stock market. But the risk of a trade war could wipe out those economic gains as it eats away at the moral fiber of the country.

A similar analysis applies to the effort to ferret out illegal aliens in dozens of sanctuary cities. These cities do not offer protection to individuals that commit criminal offenses. But they do offer help to illegal aliens whose only offense is being in this country. Once again, the question is, why extend the net so widely when the very success of the American economy in many locations depends on contributions from undocumented workers who pay income, sales, property, and Social Security taxes, even though they may turn out to be short-termers? In dealing with these vexing issues, it is critical for the President to get some buy-in from immigrant groups who stoutly oppose him. By acting unilaterally, he has already stirred up a storm of protest, without having the foggiest notion of its long-term social consequences.

The obvious next question is, what, if anything, can be done to stop the President in the days, months, and years to come? The first step should be a sharp rebuke from Congress in the form of a refusal to appropriate any funds for the construction of the wall with Mexico, or to carry out any other executive order, which should be doable on a combination of policy and fiscal grounds. The great advantage of this route is it puts Trump on the defensive, and buys time for a more thoughtful approach to these problems.

Short of that, there is a great temptation to seek constitutional remedies to deal with these matters. The bad news on this front is that the culture of overly broad administrative deference is particularly strong with issues of immigration and entry into the United States. One example of an attack that will not work is that suggested by my University of Chicago colleagues, Professors Daniel Hemel, Jonathan Masur, and Eric Posner. Rightly appalled by the mindless Trump EO, they have made the tantalizing suggestion that the ghost of Antonin Scalia could block construction of the wall. The point of their article is that Trump cannot proceed under the Secure Fence Act of 2006, which authorizes the Secretary of Homeland Security to “take all actions the Secretary determines necessary and appropriate to achieve and maintain operational control over the entire international land and maritime borders of the United States.” In their view, the words “necessary and appropriate” forbid a wall that produces only trivial benefits in exchange for large costs. Scalia’s opinion in Michigan v. EPA, which they cite for this conclusion, does not bear that weight. Over the dissent of the four liberal justices (who, by their reasoning in this case, would have to bless the wall), Scalia rejected a power plant regulation that imposed $9.6 billion in annual costs for identifiable benefits between $4 and $6 million per year—clearly an absurd result of any cost-benefit analysis.

Yet two features of this case stand out. First, it only stood for the proposition that the government cannot wholly “disregard” costs in making its judgment, even if, as he accepts, the government receives “capacious” deference under Chevron in executing any particular statutory command. The Trump analysis, in contrast, makes an elaborate if unpersuasive case of the high costs of continued immigration, starting with an assumption that some wall is necessary and then leaving it to the Secretary to decide how to execute on the program. I have no doubt that Scalia would have gritted his teeth by holding this a permissible delegation, which, under the current toothless non-delegation doctrine, it surely is.

The constitutional questions are harder to resolve for the EO on sanctuary cities, which holds that the executive branch will “ensure that jurisdictions that fail to comply with applicable Federal law do not receive Federal funds, except as mandated by law.” This turns out to be a tall order, fraught with constitutional and operational difficulties, even if it is widely accepted that federal law preempts state law under the Supremacy Clause of the Constitution on matters relating to the status of aliens, legal and illegal, in the United States. The first point is one of simple logistics: The covered states and cities receive massive funds for all sorts for purposes wholly unrelated to the immigrant problem. It is inconceivable that any President would be so foolish as to cut out any and all discretionary funding on matters of education, health care, the environment, and more. Second, there is a genuine constitutional puzzle over what it means to “fail to comply with applicable Federal law.” The famous 1997 Scalia opinion in Printz v. United States held that it was unconstitutional for the federal government to command state and local law enforcement officials to perform background checks on persons applying to use guns. The theory was that this enforcement encroached on the reserved powers of the state as protected by the Tenth Amendment.

It thus becomes clear that the United States cannot press state and local police officers to arrest persons on its instructions. But, by the same token, Printz does not allow state and local police to throw federal immigration officials off the scent by giving them false information about their whereabouts. Yet there is a large gray middle that defies easy resolution under current law. If the state officials receive notice that federal immigration authorities want to collect a person known to be in custody, may the state release that person before the federal officials have a chance to do the apprehension? Must they open the cell door? If not, can the federal officials break the door down? It is not possible to administer any law in which actions involved in the transfer of custody from state to federal officials raises difficult issues that could be litigated ad nauseam in courts around the country.

The President is horribly off base when he thinks that he is responding to an immigration and refugee crisis, which his petty, unwise, and precipitous actions have inflamed. On these issues, he should heed this simple advice: back off, or resign, or both, before it is too late.

overlay image