U.S. President Donald Trump on Wednesday evening blasted a decision by a judge in Hawaii to place a nationwide block on his revised travel order, just hours before it was set to go into effect.

Speaking at a campaign rally in Nashville, Tennessee, Trump slammed the decision as “an unprecedented judicial overreach.”

He called the ruling “terrible” and vowed to take the legal fight all the way to the nation’s highest court.

"We're going to take our case as far as it needs to go, including all the way to the Supreme Court. And we're going to win," declared Trump.

"I think we ought to go back to the first [ban], and go all the way," he added. "That’s what I wanted to do in the first place.”

The President suggested the judge’s ruling was politically motivated, adding it “makes us look weak” in the fight against terrorism.

Trump’s new order blocks citizens of six Muslim-majority countries: Iran, Libya, Somalia, Sudan, Syria and Yemen. Iraqi citizens, covered by the initial ban, will be allowed to travel to the United States under the new order.

The order is temporary, until proper vetting procedures – a central campaign promise of Trump’s – can be implemented.

The restraining order issued Wednesday, which will be in place while the judge considers the case, blocks the sections of the travel ban that would have temporarily suspended the refugee resettlement program and barred nationals from six majority-Muslim countries from entering the U.S. for 90 days. The policy was set to go into effect just after midnight.

Hawaii challenged the new travel ban in court last week, arguing it would hurt Hawaii’s tourism industry and its businesses, along with Hawaii educational institutions.

Democratic attorneys general in four states subsequently announced they would try to block the travel ban in court.