A federal judge in Hawaii issued a worldwide restraining order against enforcement of key parts of President Donald Trump’s revised travel ban executive order just hours before the directive was set to kick in.

U.S. District Court Judge Derrick Watson ruled that the state of Hawaii and a local Muslim leader had “a strong likelihood of success on their claim” that Trump’s order intentionally targets Muslims and therefore violates the Constitution’s guarantee against establishment of religion.

Watson bluntly rejected the federal government's claims that the new directive does not target Islam because it is focused on six countries that account for less than 9 percent of the world's Muslims.

"The illogic of the Government’s contentions is palpable," wrote Watson, an appointee of President Barack Obama. "The notion that one can demonstrate animus toward any group of people only by targeting all of them at once is fundamentally flawed. The Court declines to relegate its Establishment Clause analysis to a purely mathematical exercise."

The ruling is another serious blow to Trump’s attempt to limit immigration as part of what he claims is an effort to reduce the threat of terrorist attacks in the U.S.

Watson's decision was handed down as Trump was in Tennessee preparing to speak to a campaign rally. White House press secretary Sean Spicer told reporters there that he had no immediate comment on the ruling, which he said officials were still reviewing. A Justice Department spokeswoman also had no initial comment.

Trump effectively abandoned an earlier, broader version of his travel ban order after the bulk of it was blocked by another federal judge.