A federal judge in Hawaii blocked United States President Donald Trump’s new travel ban just hours before it was due to come into effect. Trump has described it as being “unprecedented judicial overreach”, and vowed to fight it up to the Supreme Court if necessary. “We are going to win,” he told a rally in Nashville, Tennessee. “The law in the constitution gave the president the power to suspend immigration when he deems it to be in the national interest of our country,” he said, visibly angry at the judge’s decision.

The Hawaii ruling was an emergency halt to an executive order signed on March 6. This was the second such executive order Trump had signed to stop immigrants from Muslim countries, and refugees from entering the US. His earlier ban had also been rejected by a federal judge.

Judge Derrick Watson, who was ruling in a case filed by the state of Hawaii, said the state could suffer financially if Trump’s ban blocked tourists and students from entering. Watson also said that the ban violated the First Amendment protections against religious discrimination. “The illogic of the government’s contentions is palpable,” his order said, according to AP.

Watson went on to note several inflammatory statements made by Trump that had singled out Muslims, and said the remarks were “significant and unrebutted evidence of religious animus”.

Trump has said several times that his ban was not discriminatory against any specific religion and that it was critical for national security. After Watson’s ruling, Trump said the move made “us look weak, which we no longer are, by the way”. “We’re going to win. We’re going to keep our citizens safe. The danger is clear. The law is clear. The need for my executive order is clear.”

Trump has defended the first order and repeatedly said it was “not a Muslim ban”, but the restrictions brought in by his move had wreaked havoc on immigrant families, especially those with valid visas. Protests had been launched across the country, including at airports, against the travel ban. His executive order had also been criticised by several quarters, including politicians, activists, immigration advocates and even United Nations Secretary-General Antonio Guterres.