Here’s how the process normally works and where Trump deviated, sending the nation’s airports into chaos.

EXECUTIVE BRANCH

LEGISLATIVE BRANCH

EXECUTIVE BRANCH

LEGISLATIVE BRANCH

In the process of formulating an executive order, the president’s staff typically reach out to their party’s congressional leaders for feedback. In the case of the travel ban, President Trump declined to do so, leaving leaders in the dark.

EXECUTIVE BRANCH

LEGISLATIVE BRANCH

EXECUTIVE BRANCH

LEGISLATIVE BRANCH

Instead, Trump’s staff consulted staffers of Congress members without the knowledge of party leadership, and had them sign nondisclosure agreements. This is virtually unheard of, according to Andy Rudalevige, a professor of government at Bowdoin.

EXECUTIVE BRANCH

OMB

DHS

STATE

DOJ

EXECUTIVE BRANCH

OMB

DHS

STATE

DOJ

Once an executive order is proposed, it is required to be sent to the Office of Management and Budget, an executive branch agency, for review. The OMB sends it along to affected agencies — here, those could be within the State Department, Department of Homeland Security and Department of Justice —  for comments, which it compiles into a report and returns to the president. Because the agencies are the ones that will eventually carry out the order and the employees are experts in their field, this step ensures the order is effective and realistic to implement.

There is no evidence that Trump went through this process, according to Rudalevige — OMB never released a report. On Jan. 31, Homeland Security Secretary John F. Kelly, told Congress he had some lead time before the order was issued, but it was unclear if he was aware of the details.

This process is legally required by an executive order put in place by President John F. Kennedy. Although Trump is technically in violation, he will probably see no consequences, according to Rudalevige. The executive branch is charged with enforcing executive orders, so Trump can simply choose not to enforce it in this case. He also has the option to revoke Kennedy’s order, allowing him to bypass OMB in the future without breaking the law.

EXECUTIVE BRANCH

OLC

EXECUTIVE BRANCH

OLC

Under that existing executive order, Trump’s order was required to receive guidance from the Office of Legal Counsel, a part of the Department of Justice. The OLC evaluates the order for legality, in a narrow sense — it considers the text of the order, but not the motivations behind it or its broader implications on justice.

In this case, Trump’s order did go through OLC review, but the process was so hectic that some Department of Justice officials said they thought it never happened, according to reports from CNN, and the department declined to confirm it occurred for several days after the order’s implementation.

EXECUTIVE BRANCH

DHS

STATE

DOJ

EXECUTIVE BRANCH

DHS

STATE

DOJ

 The Trump administration had the order go into effect immediately after it was signed. This is quite rare for orders that affect private individuals, according to Rudalevige. He said it’s much more common for administrative directives, such as when President Obama changed the order of succession in the Environmental Protection Agency before leaving office.

This immediate implementation left little time for the affected agencies, such as Customs and Border Protection, to make sense of the order and plan its application.

Chaos ensued. People who boarded flights with valid visas were detained at U.S. airports when they landed. According to lawsuits, some were denied access to lawyers, and were instructed to sign away their right to the visa and then were sent back to their home countries. Protests at international arrival terminals around the nation swelled.

The immediate question: Was the order legal? Executive orders are constrained in a few major ways. First, the orders can only exercise powers given to the president by the Constitution or laws passed by Congress. (One significant consequence — the orders can’t spend money that Congress hasn’t appropriated.) Generally, the president’s authority over immigration is quite broad.

Second, the order must comply with the Constitution, most notably by not violating individuals’ or states’ rights. The primary recourse for a violation here, as has happened with Trump’s immigration order, is judicial action.

 

JUDICIAL BRANCH

OUTSIDE GROUPS

EXECUTIVE BRANCH

JUDICIAL BRANCH

OUTSIDE GROUPS

Lawsuits began to pour in the day after the order was signed. Within a week, more than 50 had been filed against the Trump administration by individuals affected by the ban and several states. They argued, among other things, that the ban violated visa holders’ rights to due process and that it is discriminatory on the basis of religion. The Trump administration argued that it’s within the president’s power to change immigration regulations in the name of national security.

JUDICIAL BRANCH

EXECUTIVE BRANCH

DHS

STATE

DOJ

JUDICIAL BRANCH

EXECUTIVE BRANCH

DHS

STATE

DOJ

Judges across the country began issuing temporary stays on different aspects of the ban. The first came the night after the order was signed — a Brooklyn court order blocked deportations of people detained at airports nationwide. Similar orders followed from Alexandria, Va., and Seattle courts, as well as a broader one out of Boston, all within a day.

Despite the court orders, chaos continued. Officials at some airports reportedly defied the orders at first, continuing to detain visa holders and deny them access to lawyers. But in the hours that followed, marked by protests and confrontations by lawyers and members of Congress, detainees began to be released.

JUDICIAL BRANCH

EXECUTIVE BRANCH

DOJ

JUDICIAL BRANCH

EXECUTIVE BRANCH

DOJ

A few days after the initial rulings, then-acting attorney general Sally Q. Yates declined to defend the order, which is typically the Justice Department’s responsibility. In a memo to the department, Yates said the order was not “consistent” with the department’s responsibility to “always seek justice and stand for what is right.” Trump promptly fired her, replacing her with Dana Boente, who has defended the order in court.

JUDICIAL BRANCH

WASHINGTON STATE

DHS

STATE

DOJ

WASHINGTON STATE

JUDICIAL BRANCH

EXECUTIVE BRANCH

DHS

STATE

DOJ

As it stands, the order is still working its way through the legal system. Most significantly, on Feb. 3, a Seattle judge temporarily blocked implementation of the ban in its entirety in response to Washington state’s lawsuit. The Trump administration appealed the decision, and the 9th Circuit maintained the freeze on Thursday. An appeal to the Supreme Court is expected, but with the court ideologically split 4-4, a tie would allow the lower court’s decision to stand. A full trial on the merits of the law beyond just the temporary block could happen next.

EXECUTIVE BRANCH

LEGISLATIVE BRANCH

EXECUTIVE BRANCH

LEGISLATIVE BRANCH

In addition to these legal challenges, Congress can overturn an executive order by passing a law that contradicts it. This rarely occurs. The legislative process is much slower than a court challenge, and given that the president would probably veto the bill, there would need to be a two-thirds majority in each house of Congress to pass it. Democrats have begun working on such a bill, but few Republicans have publicly opposed the order, and the bill’s passage is unlikely.

Sources: Andy Rudalevige, a professor of government at Bowdoin, National Archives and news reports.

Icons from the Noun Project artists Shashank Singh, Bernar Novalyi, Roselin Christina and Chelsea Carlson.

More coverage