Donald Trump's third attempt to restrict entry into the United States was supposed to take full effect just after midnight.

A federal judge stopped much of it only hours before that could happen.

On October 17, 2017, U.S. District Judge Derrick Watson in Hawaii issued a nationwide temporary restraining order blocking the Trump administration from enforcing major portions of Presidential Proclamation 9645, the revised travel restrictions Trump had announced less than a month earlier.

The ruling affected travelers from Chad, Iran, Libya, Somalia, Syria and Yemen.

Restrictions involving North Korea and certain Venezuelan government officials and their families were not blocked because the Hawaii plaintiffs had not challenged those portions.

It was now Trump's third major version of the travel ban.

And for the third time, his effort had collided with the federal courts.

The Administration Had Tried to Build a Stronger Ban

Trump issued his first travel ban on January 27, 2017.

The hurried implementation created confusion at airports across the country as travelers were detained and attorneys, protesters and family members descended on terminals.

Federal courts intervened almost immediately.

The administration responded with a revised executive order in March.

That version was challenged too.

By September, the White House had developed a substantially different approach.

Instead of another temporary executive order applying similar restrictions to a group of predominantly Muslim countries, the administration conducted what it described as a worldwide review of foreign governments' identity-management and information-sharing practices.

Trump then issued Proclamation 9645 on September 24.

The new policy imposed different restrictions on nationals from eight countries:

Chad.

Iran.

Libya.

North Korea.

Somalia.

Syria.

Venezuela.

Yemen.

The administration argued that the new structure directly addressed the objections raised against Trump's previous orders.

The courts were about to decide whether that was enough.

Hours Before the Restrictions Took Effect

Significant portions of the proclamation were scheduled to take effect at 12:01 a.m. Eastern time on October 18.

On October 17, Judge Watson acted.

The Hawaii federal judge granted a temporary restraining order preventing the government from enforcing the challenged restrictions nationwide.

Watson had already played a major role in the legal fight over Trump's earlier travel restrictions.

Now the administration was back in his courtroom.

And Watson concluded that the latest version still had serious legal problems.

The new proclamation, he wrote, “suffers from precisely the same maladies as its predecessor.”

The Judge Questions Trump's Authority

The October 17 ruling focused heavily on federal immigration law and the authority Congress had delegated to the president.

Trump relied on a provision of the Immigration and Nationality Act that gives presidents broad authority to suspend the entry of foreign nationals when their admission would be detrimental to the interests of the United States.

The administration argued that this authority allowed Trump to impose the new restrictions after his government had completed its worldwide security review.

Watson disagreed that the proclamation had adequately justified such sweeping nationality-based restrictions.

He concluded that Hawaii was likely to succeed in its argument that the president had exceeded the authority granted by Congress.

Watson also questioned whether the administration had sufficiently demonstrated why existing immigration and screening laws could not address the security concerns it identified.

The ruling therefore went beyond the political argument over Trump's rhetoric.

It raised a fundamental constitutional question that had followed the travel ban from the beginning:

How much authority does a president have to decide who may enter the United States when Congress has already established detailed immigration laws?

The Administration Says the Countries Failed Security Standards

The White House strongly rejected Watson's decision.

The administration said the proclamation followed an extensive worldwide security review conducted by the Department of Homeland Security in consultation with other federal agencies.

Countries were evaluated according to whether they provided information necessary for the United States to identify and screen travelers.

The White House argued that restrictions were imposed on governments that were unable or unwilling to satisfy American security standards or presented other significant national-security concerns.

Unlike Trump's original January order, the September proclamation did not apply the same restriction to every country.

The rules varied depending upon the circumstances.

North Korean nationals faced extremely broad restrictions.

Iranian nationals faced different rules.

Somalia had another set of restrictions.

Venezuela's provisions applied only to certain government officials and members of their immediate families.

The administration described the policy as “tough but tailored.”

Watson was not persuaded.

Was It Still the “Muslim Ban”?

Another argument continued to shadow the case.

During the 2016 campaign, Trump had explicitly called for what his campaign described as a “total and complete shutdown of Muslims entering the United States” until the government could determine what was happening.

After Trump became president, his administration insisted that the travel restrictions were based on national security rather than religion.

The September proclamation strengthened that argument in several ways.

North Korea was not a Muslim-majority country.

The Venezuelan restrictions targeted certain government officials rather than a religious population.

The administration had also conducted a worldwide review before selecting the affected countries.

Opponents argued that those changes did not erase Trump's previous statements or the fact that the broadest restrictions continued to affect several Muslim-majority nations.

The legal dispute therefore involved both the text of the proclamation and the history that preceded it.

North Korea and Venezuela Remain

Watson's ruling did not eliminate the entire proclamation.

The restrictions concerning North Korea and Venezuela remained in place.

That was largely because Hawaii's lawsuit challenged the restrictions involving the six Muslim-majority countries rather than those two provisions.

For North Korea, Trump's proclamation broadly suspended immigrant and nonimmigrant entry.

For Venezuela, the policy was much narrower and applied primarily to certain officials of designated Venezuelan government agencies and their immediate family members seeking particular types of visas.

The distinction was important.

Headlines frequently described Watson as blocking Trump's third travel ban.

More precisely, he blocked the portions of the proclamation that Hawaii had challenged.

Another Judge Soon Joins In

The Hawaii ruling was not the end of the immediate legal trouble.

Within hours, U.S. District Judge Theodore Chuang in Maryland also blocked significant portions of Trump's proclamation.

The two judges used somewhat different legal reasoning.

Watson focused heavily on the president's statutory authority under federal immigration law.

Chuang's ruling also considered whether Trump's previous statements about Muslims indicated that the policy was motivated by religious discrimination.

Once again, multiple federal courts had prevented a Trump travel policy from taking effect as planned.

And once again, the administration prepared to appeal.

The White House Fires Back

The White House called Watson's order “dangerously flawed.”

Administration officials argued that judges were interfering with the president's ability to protect national security.

The White House emphasized that the proclamation had not been hastily assembled.

It had followed a worldwide review involving the Departments of Homeland Security, State and Defense, along with the attorney general and other officials.

The administration said the restrictions were necessary to pressure foreign governments to provide sufficient information for American authorities to properly vet travelers.

The Justice Department promised to defend the proclamation.

The White House predicted that the judiciary would ultimately uphold Trump's authority.

That prediction would eventually prove correct.

But not yet.

The Travel Ban Heads Toward the Supreme Court

The legal fight continued through the remainder of 2017.

Appellate courts reviewed the restrictions.

The administration continued defending the president's authority.

Opponents continued arguing that the proclamation violated federal immigration law and the Constitution.

In December, the Supreme Court allowed the September proclamation to take full effect while litigation continued.

The case ultimately reached the Supreme Court as Trump v. Hawaii.

On June 26, 2018, the Court ruled 5–4 in favor of the administration.

Chief Justice John Roberts wrote that federal law granted the president broad discretion to suspend entry by foreign nationals and concluded that the proclamation was based on a legitimate national-security rationale.

The ruling effectively ended the central legal challenge to Trump's third travel ban.

But none of that was known on October 17, 2017.

On that day, the administration had lost again.

Three Attempts, Three Court Battles

The evolution of Trump's travel restrictions during his first year demonstrated how dramatically presidential policy could change under judicial scrutiny.

The January order had been sweeping and implemented immediately.

The March order was rewritten in response to the first round of litigation.

The September proclamation was more sophisticated still.

It followed a worldwide review.

It imposed country-specific restrictions.

It included two countries outside the group of Muslim-majority nations at the center of the previous controversy.

It contained exceptions and waiver provisions.

And it was designed specifically to survive judicial review.

Yet before the policy could fully take effect, a federal judge blocked much of it anyway.

For nearly nine months, Trump had attempted to transform one of his most controversial campaign promises into government policy.

Every revision produced another lawsuit.

Every legal defeat produced another revision.

And every revision raised the same underlying question about the limits of presidential power over immigration.

On October 17, Donald Trump's third travel ban reached the courthouse.

Once again, the courthouse stopped it.

The difference this time was that the legal battle was moving steadily toward a final destination:

The Supreme Court.