A federal judge has halted the implementation of President Donald Trump’s revised ban on travel of immigrants and refugees, just as it was about to go into effect.

A Hawaii federal judge granted a temporary halt to the order, after the state challenged the ban. Other challenges to Trump’s executive order are pending in other states.

Trump’s travel ban, unveiled last week, was designed to withstand legal muster, unlike the administration’s previous Jan. 27 order that was sidelined by federal district and appellate courts.

The scope of the new order was narrower, as Iraq was removed from a list of countries affected by a travel ban. That left Somalia, Iran, Syria, Sudan, Libya, and Yemen as countries where travel visas were to be denied for at least 90 days. The new order also temporarily shut down the U.S. refugee program.

At a rally in Nashville, Trump called the judge’s order “an unprecedented judicial overreach.” He said that the ruling “makes us look weak,” and he vowed to fight it.

“Let me tell you something: I think we ought to go back to the first one,” Trump said to the crowd, referring to his first executive order.

U.S. District Judge Derrick Watson issued the temporary restraining order, and it applies nationwide.

Critics had said that despite the revisions in the new executive order, it still singled out Muslim-majority countries.

Watson wrote that the state of Hawaii and another plaintiff, Ismail Elshikh, a leader in the state’s Islamic community, were “likely to succeed on the merits” of their claim that the order violated the Establishment Clause of the Constitution because “a reasonable, objective observer—enlightened by the specific historical context, contemporaneous public statements, and specific sequence of events leading to its issuance—would conclude that the Executive Order was issued with a purpose to disfavor a particular religion.”

Although Watson wrote that the order “does not facially discriminate for or against any particular religion, or for or against religion versus non-religion,” he said that the record still showed that there was “significant and unrebutted evidence of religious animus” driving the policy.

“Any reasonable, objective observer would conclude, as does the Court for purposes of the instant Motion for TRO, that the stated secular purpose of the Executive Order is, at the very least, “secondary to a religious objective” of temporarily suspending the entry of Muslims,,” he wrote. He cited past statements that Trump had made calling for a ban on Muslims entering the country, as well as those made by Rudy Giuliani after the initial order was issued.

Giuliani said then that when “when [Trump] first announced it, he said, ‘Muslim ban.’ He called me up. He said, ‘Put a commission together. Show me the right way to do it legally.’”

Watson also noted that one of Trump’s advisers, Stephen Miller, said on Feb. 21 that the revised order was “still going to have the same basic policy outcome.”

Watson was nominated to the federal court by President Barack Obama.