President Donald J. Trump. Chris Kleponis/Pool - Getty Images A federal judge in Hawaii put a temporary, nationwide suspension on the third iteration of President Donald Trump's travel ban.

People from Iran, Syria, Yemen, Somalia, Chad, and Libya will be able to continue to visit the US.

The Trump administration has already said it will appeal the judge's ruling, paving the way for a potential Supreme Court showdown in the future.

A federal judge in Hawaii on Tuesday granted a temporary restraining order against President Donald Trump's third travel ban, just hours before it was set to take effect at midnight on October 18.

Trump issued a proclamation last month restricting travel to the US from nationals of eight countries, including Iran, Syria, Yemen, Somalia, Venezuela, Chad, Libya, and North Korea.

Those restrictions came after the first two iterations of the travel ban, which targeted majority-Muslim nations, faced court challenges.

Trump's second travel ban was partly implemented, and the Supreme Court was scheduled to hear arguments on its constitutionality in October.

But the justices removed oral arguments from the schedule after part of the second ban expired and Trump issued the third ban as a replacement in September. The third ban will likely make its way to the Supreme Court, as well, though it must go through the appellate court system first. Another federal court is also expected to rule on the ban in a separate legal challenge.

Almost immediately after Watson issued the temporary restraining order on Tuesday, the Department of Justice announced it would appeal the ruling.

"Today's ruling is incorrect, fails to properly respect the separation of powers, and has the potential to cause serious negative consequences for our national security," the department said in a statement.

The White House said in a separate statement that the ban was vital for "the integrity of our immigration system and the security of our nation."

"Today's dangerously flawed district court order undercuts the president's efforts to keep the American people safe and enforce minimum security standards for entry into the United States," the statement said.

As the plaintiffs only sought to challenge the ban as it pertained to majority-Muslim countries, they did not include in their lawsuit the restrictions on travel from Venezuelan government officials or North Koreans. The ban will therefore take effect against those countries starting Wednesday.

Blocking the third ban

Protests erupted at airports across the country, like this one in San Francisco, after the first ban was issued on January 28, 2017. Stephen Lam/Getty US District Court Judge Derrick Watson wrote in a 40-page opinion on Tuesday that Trump's third travel ban would cause "irreparable harm" and violate federal immigration law were it to take effect.

"[The travel ban] suffers from precisely the same maladies as its predecessor: it lacks sufficient findings that the entry of more than 150 million nationals from six specified countries would be 'detrimental to the interests of the United States,'" Watson wrote, adding that the ban "plainly discriminates based on nationality."

Trump's newest proclamation, issued on September 24, replaced the outright ban with travel restrictions tailored on a country-by-country basis, depending on whether or not they met certain US standards.

Unlike the previous travel bans, the third version did away with the original 90-day suspension on admitting travelers from the named countries. Instead, the new ban would have issued permanent travel restrictions that could be expanded or retracted based on the countries' compliance with US standards.

Watson also ruled that Trump's proclamation contained "internal incoherencies that markedly undermine its stated 'national security' rationale," because many other countries that were not named in the ban also fail to meet one or more of the US's standards.

For instance, Watson noted, Iraq is excluded from the ban purportedly because of diplomatic ties to the US and its "commitment" to fighting ISIS, but fails Trump's "baseline" security assessment.

"Under the law of this Circuit, these provisions do not afford the President unbridled discretion to do as he pleases," Watson said, calling the proclamation "simultaneously overbroad and underinclusive."

Zarfishan Zahid smiles as Sana Tahir holds Malaika Noman, 3, as the child arrives at Washington Dulles International Airport after a federal judge blocked the second ban on July 14, 2017. Reuters/James Lawler Duggan

Watson noted in his opinion that the plaintiffs argued that Trump "never renounced or repudiated his calls for a ban on Muslim immigration." The plaintiffs argued that Trump's calls for a full-throated ban have only grown more steady as time went on, Watson noted.

Watson's opinion even cited several of Trump's tweets from early June, in which the president railed against the legal challenges to his initial travel ban, complaining that the Department of Justice had created a "watered down, politically correct version" in an effort to appease the Supreme Court.

"People, the lawyers and the courts can call it whatever they want, but I am calling it what we need and what it is, a TRAVEL BAN!" Trump wrote in another tweet, which Watson also cited in his opinion.

On Tuesday, Neal Katyal, one of the lawyers representing the plaintiffs, celebrated Watson's ruling. "We have just won," Katyal tweeted.

The American Civil Liberties Union, which has sued the Trump administration over all three travel bans, also tweeted about the ruling, saying, "We're glad but not surprised, to be honest."

Read the full order below: