A federal judge blocked a large part of President Trump’s revised travel ban Tuesday, just hours before it was to take effect, saying the White House’s latest attempt to impose extreme vetting on travelers from dangerous countries is just as illegal as the last two versions.

Administration officials vowed a quick appeal, and officials said they were confident Mr. Trump eventually would prevail.

But in the meantime, Judge Derrick K. Watson’s ruling stands as the latest defeat for a president who has tried since his earliest days to stiffen U.S. defenses against visitors from suspect countries.

“Although national security interests are legitimate objectives of the highest order, they cannot justify the public’s harms when the President has wielded his authority unlawfully,” wrote Judge Watson, an Obama appointee to the federal court in Hawaii.

It was the third time Judge Watson had struck down a significant part of the travel ban. His two previous rulings were each pared back by the Supreme Court, and the Trump administration said it is confident that higher courts will step in again this time and overrule Judge Watson.

“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 White House said in a statement.

The revised travel ban Mr. Trump issued late last month — updated versions were issued in January and March — targets eight countries for restrictions: Chad, Iran, Libya, North Korea, Somalia, Syria, Venezuela and Yemen.

Judge Watson allowed restrictions on North Korea and Venezuela to go into effect but blocked the policy for the other six countries — all majority-Muslim.

While the judge didn’t accuse Mr. Trump of anti-Muslim “animus” — a charge he and other judges had lobbed at the president in previous rulings — Judge Watson said the latest version still breaks the law and the “founding principles of this nation” by singling out people by nationality.

He said the president didn’t do enough to prove why the six countries needed additional restrictions, which for most of the countries involve a near-complete halt on immigration from those nations and severe restrictions on visitor visas as well.

Judge Watson pointed in particular to a leaked Homeland Security Department memo that said country of citizenship wasn’t a good predictor of terrorist activity.

Hawaii Attorney General Doug Chin, who led the challenge, cheered the ruling.

“This is the third time Hawaii has gone to court to stop President Trump from issuing a travel ban that discriminates against people based on their nation of origin or religion. Today is another victory for the rule of law,” he said.

Mr. Trump thought he had finally solved court objections, which in the past had accused him of being too hasty, too nasty and too blunt in his approach to his goal of “extreme vetting.”

This time, he had the State and Homeland Security departments conduct a monthslong review of nearly 200 countries’ policies on information sharing with the U.S. about their citizens.

That produced a long list of countries that either were unwilling or unable to cooperate. After working through those problems and winning promises of better help, the list was whittled to eight.

Iraq, which would have qualified for the list, was left off because it’s considered a critical partner in the U.S. fight against the Islamic State. Still, Iraqis will face stiffer screening under the updated policy.

Somalia ended up on the restrictions list even though it does cooperate. American authorities said the government lacks control over large parts of the country, making it difficult to rely on documents and assurances from there.

Sudan, which was on the previous two travel ban lists, was taken off because of assurances about cooperation.

The Trump administration said Tuesday that Chad, which was newly added to the target list in this latest revision of the travel ban, is working to improve and earn its way off the list.

Still, Judge Watson said inconsistencies such as leaving Iraq off the list and putting Somalia on the list showed the administration was picking favorites. He also criticized the administration for failing to justify the varying levels of restrictions, such as banning student visas from some countries but not others.

“The nature and scope of these types of inconsistencies and unexplained findings cannot lawfully justify an exercise of Section 1182(f) authority, particularly one of indefinite duration,” Judge Watson wrote.

Section 1182(f) of the immigration law grants the president the ability to “suspend the entry of all aliens or any class of aliens and immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate.”

The administration says that law is clear in granting the president expansive powers — which previous administrations have also used — to target visitors and migrants from specific countries.

“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,” said Ian Prior, a spokesman for the Justice Department.

The previous version of the travel ban was blocked by Democrat-appointed judges in Maryland and Hawaii and on two federal appeals courts. Republican-appointed judges who have heard the case, meanwhile, have upheld the policy.

The Supreme Court had been slated to hear arguments on the earlier version of the travel ban last week, but after Mr. Trump’s revisions in September, they called off the hearing, saying the lower courts needed to evaluate the policy.

While Tuesday’s ruling affects the country-specific travel ban, another part of the original executive order — a 120-day pause on refugee admissions — remains mostly in effect, with some court-ordered exceptions.

The 120-day period expires at the end of this month, and analysts are waiting to see whether Mr. Trump tries to extend the pause. He has already slashed the overall refugee target from 110,000 people in 2017 to 45,000 in 2018.

Sign up for Daily Newsletters Manage Newsletters

Copyright © 2020 The Washington Times, LLC. Click here for reprint permission.