President Trump on Wednesday slammed a court ruling blocking his revised travel ban as “an unprecedented judicial overreach.”

Speaking at a rally in Nashville, Tenn., Trump called the ruling “terrible” and pledged 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 up to the Supreme Court,” Trump said.

“We're going to win,” he continued. “The danger is clear. The law is clear. The need for my executive order is clear."

ADVERTISEMENT

The comments came just hours after a federal judge in Hawaii dealt Trump a major blow by placing a nationwide hold on the new travel ban, which was set to go into effect at midnight.

Trump appeared angered by the ruling, suggesting it was made for “political reasons” and “makes us look weak” in the fight against terrorism.

He vented his frustration at the block because he said the new order was “tailored to the dictates of the flawed ruling” that halted his first travel ban.

“This is a watered-down version of the first one,” Trump said. “And let me tell you something, I think we ought to go back to the first one and go all the way, which is what I wanted to do in the first place.”

Those comments could further roil the legal battle over Trump’s latest executive order, which temporarily bars people from six Muslim-majority nations from entering the U.S. — down from seven — while freezing refugee resettlement for four months.

Judge Derrick Watson, who was appointed by President Obama, cited remarks made by Trump and his senior advisers in arguing the latest order should be put on hold.

He noted that senior adviser Stephen Miller said in a Fox News interview last month that the revised order was intended to have “the same basic policy outcome” as the first one, aside from a few changes designed to bolster the administration’s legal standing.

Miller subsequently emailed The Hill to say the changes would be “fully responsive to the courts” and, while technical, “will be quite substantial.”

The judge also pointed to Trump’s stated desire from the presidential campaign to impose a “Muslim ban.”

Trump appeared to acknowledge his words could add fuel to the firestorm surrounding the executive order.

“I have to be nice, otherwise I’ll be criticized for speaking poorly about our courts,” he told the crowd. “Among the most dishonest people in the world, I will be criticized.”