President Trump’s Executive Order (EO) barring entry from seven Muslim majority countries and suspending the refugee resettlement program has sparked public outcry, caused upheaval and suffering at the nation’s airports, and prompted fast-moving litigation. It also has shed stark light on some critical questions about the relationship between the President and the bureaucracy. When the President has articulated a set of policy priorities, how can he ensure that they permeate the bureaucracy? The absence of strong political control and supervision can produce arbitrary and even chaotic government. But what happens if the arbitrariness comes from the top? If the President’s priorities are actually illegal or immoral? Should we depend on or unleash the valiant civil servant to check presidential abuses of power?

The President depends on the bureaucracy to implement his objectives, whether embodied in an EO or some other form of guidance. In immigration law, that bureaucracy is vast, from the State Department’s consular officials spread throughout the world, to Customs and Border Protection (CBP) agents dispersed at ports of entry around the country, to Immigration and Customs Enforcement (ICE) agents in field offices throughout the interior. What is more, as recent events make clear, lots of private actors, such as the airlines, also form part of the implementation chain.

In the best of times, consistency in adjudication and enforcement proves elusive. Ordinarily, the immigration bureaucracy’s work is framed by regulations, field manuals, and other forms of guidance continually updated by the different agencies involved and keyed to the Immigration and Nationality Act. But on occasion, the President or his Cabinet officials decide to declare priorities at the highest levels—think not just Trump’s executive order, but also President Obama’s initiatives to provide enforcement relief to certain unauthorized immigrants (Deferred Action for Childhood Arrivals (DACA) for immigrants brought to the U.S. as children and a counterpart action for parents of citizens and lawful permanent residents (LPRs)). When this happens, one need not believe in any notion of a “unitary executive” to see the importance of the civil service abiding by the direction that comes from the White House and other politically accountable officials. This hardy expectation of compliance is entirely consistent with robust civil service protections from retaliation for disagreement, dissent, or even disobedience, and should never serve as a justification for a purge of discordant bureaucrats by political overseers. But to cabin and systematize the vast powers of the Executive Branch, our elected officials must have control and respect.

Instead of beginning with how this should play out in the context of the EO, let’s start with the Obama White House. As Adam Cox and I have written, a main purpose of Obama’s relief initiatives was to control line level agents, to get them to adhere to the administration’s enforcement priorities. Together with two different Secretaries of Homeland Security, the administration created application processes for certain unauthorized non-citizens to seek relief from deportation, structured with clear eligibility criteria and strong mechanisms of supervision. But line agents initially resisted this attempt at political control, much as they had resisted or stymied the prior regime of informal guidance. Before United States v. Texas, in which the Supreme Court divided 4-4 over whether Obama’s relief for the parents of citizens and LPRs was lawful, there was Crane v. Napolitano—a lawsuit filed by ICE agents who claimed that DACA forced them to violate their oaths to the Constitution. Their theory of the case implied that line agents should be free to engage in their own constitutional interpretation, second guessing the determinations of their superiors. As Dave Martin wrote at the time, this is no way to run an Executive Branch, especially when the bureaucracy is large and dispersed and exercises coercive law enforcement functions.

But this bureaucratic dispersal also means that the White House and high-level political officials must supervise and direct the bureaucracy on how to implement administration policies. In this sense, the roll out of the Trump EO represents the polar opposite of the Obama initiatives. By all accounts, it appears that the Trump White House failed to enlist the relevant agency heads, much less their knowledgeable civil service personnel, when formulating the order—bypassing inter-agency consultation that could have highlighted operational concerns. The initial chaos at the airports in the days after the order’s release, and the administration’s repeated change of position on whether the EO applied to green card holders, suggest it had no real insight or plan for how to provide implementation guidance. The airport turmoil was only exacerbated by the nature of customs and border officials’ jobs. Officers at ports of entry have considerable discretion when determining whether to allow a non-citizen into the country. They know it, and they operate with that frame of mind every day. The administration’s failure to communicate the meaning of the new order created uneven enforcement. The sweeping reach of the order further amounted to a shock to the system, opening the door to overbearing law enforcement and excessive hardships for families and others.

Amazingly enough, the absence of inter-agency consultation and communication with the bureaucracy might actually become relevant in the litigation, as courts seem willing to question the President’s national security judgment in light of the haphazard formulation and implementation of the order. His disorganization and poor planning is an indication that national security may not have been his motive at all.

But even if we accept control and supervision as crucial to the rule of law, what if a civil servant feels she has been asked to engage in illegal activity? Should we encourage disobedience? Should the ICE agents who believed DACA to be unconstitutional have received our sympathy? What of the CBP officer in tears for having to detain families or otherwise deny what appeared to be valid visas?

Even if we posit that officials have an obligation to disobey clearly illegal orders (such as an order to commit war crimes), the legal claims made against both the Obama initiatives and the Trump EO are simply not established enough to support civil disobedience with any sort of confidence. From the perspective of the civil servant, there are two ways to look at this. First what protections would a dissenting civil servant have if she chose to make her own judgments about constitutionality? Ian Samuel has provided a roadmap here. Second, could a civil servant find himself liable for violating constitutional rights if he doesn’t dissent? Adam and I have explained why we think the legal claims against the Obama initiatives were meritless (and obeying them would not have entailed violating any person’s constitutional rights). In the case of the EO, none of the claims against it is sufficiently clearly established as a matter of constitutional law to defeat government officials’ qualified immunity from suit. See Pearson v. Callahan, 129 S.Ct 808 (2009), Harlow v. Fitzgerald, 457 U.S. 800 (1982).

To be sure, litigants and scholars have begun to develop the constitutional case against the order. At Just Security, Adam Cox persuasively explains why we should not assume the judiciary will simply defer to the Executive in light of the government’s supposed plenary power over immigration, and Peter Spiro at Lawfare provides reasons to be optimistic that the EO will be invalidated while noting the uphill battle, since the Supreme Court has never struck down an immigration provision “outright.”

Indeed, the government is likely to have the upper hand as the cases make it to a full hearing on the merits. The due process, equal protection, and Establishment Clause claims now on the table will be difficult to establish. It is by no means clearly established that nonimmigrants (i.e. those on temporary visas, in contrast to lawful permanent residents) who leave the country receive due process protections on their return to the United States, much less that non-citizens who have never entered the United States and are not otherwise subject to U.S. control have constitutional rights. The government can make a plausible case that the EO, on its face, targets countries because of the risk of terrorism that emanates from them, not because of religion. As many people have pointed out, the Court has said that the government need only have a “facially plausible and bona fide reason” for its immigration choices, and courts are ordinarily loath to second guess the national security judgments of the Executive. In other words, there is nothing clearly established about the illegality of the EO, and conventional court practice suggests the President ultimately will prevail. Of course, this administration has thrown convention to the wind in many ways, and these are not conventional times. The Supreme Court and even the lower courts may thus go beyond existing frameworks—but therein lies my point: No civil servant could rely on the notion that the EO is clearly unconstitutional under existing precedent. It may take judicial innovation to strike the Order down.

In the context of the travel ban EO, the question of civil servant dissent may have become moot, because the courts have stopped the administration in its tracks, at least temporarily. The question does remain salient for the immigration bureaucracy, given Trump’s clear intent to dramatically reshape immigration enforcement, and for the bureaucracy generally. But the fight over the travel ban EO has shifted to a new, even more perilous terrain—will the Executive comply with court judgments restraining its authority?

As of this writing, the temporary restraining order issued by Judge Robart in Seattle remains in place, prohibiting implementation of the entire EO. DHS and State as agencies appear to be in compliance, having announced cessation of its implementation. But elsewhere in the country, reports of line agents’ failure to comply with other court orders prohibiting the deportation of non-citizens who arrive in the United States or requiring access to counsel at the ports of entry have been accumulating, as have examples of inhumane treatment by CBP officials. These abuses may exemplify the consequences of poor supervision and guidance. They may also reflect the law enforcement culture of CBP, stoked by a Presidential declaration with sweeping reach. But they could also raise an even deeper concern—that the President and his agents might be misunderstanding, ignoring, or outright defying the judiciary.

This possibility puts the bureaucratic compliance question in a different light: is the agent’s responsibility to the courts or to her superiors? The answer is simple and urgent—everyone down the executive chain must respect the courts’ judgments. It is a command of an existential nature for our system of constitutional government. But even this obedience requires communication and supervision from high-level authorities to line-level personnel, and much remains to be said about this at a later date.

For now, I return to the doctrinal breakthroughs litigants and scholars are hoping for in this immigration and national security arena, to emphasize that extreme and egregious behavior by the government may ultimately be what is necessary to realize them. Again, the sloppy implementation of the order, the apparent failure to run it through inter-agency review before its release, and anti-Muslim statements by Trump and his surrogates could all embolden courts to subject the President’s action to heightened constitutional scrutiny.

There are at least three doctrinal developments I hope will come of this sorry episode. First, the EO presents an opportunity for the federal courts to step up and make clear that the incantation of national security or immigration is not enough to insulate government action (whether embodied in executive action or statute) from review. Like the trial court in Seattle, other courts could insist that the government come forward with actual evidence to support its judgments and thus put teeth into the “facially legitimate and bona fide reason” standard. Or perhaps the courts will jettison or intensify that standard in cases where the government’s actions warrant suspicion and thus lead judges to take account of the actual circumstances of a case.

Second, following Landon v. Plasencia, 459 U.S. 21 (1982), in which the Supreme Court concluded that a lawful permanent resident returning from a short trip abroad was entitled to due process in her exclusion hearing, the courts should recognize similar due process interests in nonimmigrants affected by the EO who were previously admitted but happened to be abroad when the EO issued, as well as nonimmigrants inside the United States who would put their status at risk by traveling. The government’s claim in its most recent brief to the Ninth Circuit that these non-citizens have no rights whatsoever is based on circuit court precedent that precedes Plasencia. Practical wisdom tells us these non-citizens’ interests are strong and that they should receive individualized consideration to determine whether national security warrants their exclusion. As Rick Hills puts it, this line of argument gives as an opportunity to “shift the constitutional status” of these non-citizens “closer to the reality of their lives.”

Finally, the Supreme Court has not upheld a categorical exclusion based on race or similar characteristics since the era of Chinese exclusion in the late nineteenth century. If the challengers can persuade the courts that the EO was motivated at least in part by anti-Muslim sentiment, the courts could finally make clear that racial and other similar exclusions are anathema to the U.S. legal order, including in the country’s exercise of its sovereign functions to admit and exclude, and even in times of crisis.

Each of these developments would constrain both the President and his bureaucracy, and possibly also Congress. But that constraint would be in defense of individual rights and in a fashion that would provide us far more security than would pinning our hopes on civil servant dissent in an arena where such dissent is as likely to be hostile to sensible immigrants policy as not.

Image: A U.S. Customs and Border Protection K-9 unit, San Ysidro, CA, Sept. 23, 2016 – John Moore/Getty