U.S. President Donald Trump (L) walks to the Oval Office after returning to the White House in Washington D.C., the United States, on Feb 24, 2017. (Xinhua/Yin Bogu)

A federal judge in Hawaii issued a nationwide temporary restraining order Wednesday to block the implementation of President Donald Trump's revised travel ban, hours before it was set to go into effect.

According to a 43-page opinion posted on the website of District Court of Hawaii, U.S. District Judge Derrick Watson concluded that allowing Trump's revised travel ban to take effect could be construed as discriminating against Muslims.

Watson blocked provisions of the March 6 executive order of Trump that would have frozen the refugee program for 120 days and stopped citizens of six Muslim countries from entering the United States. The revised travel ban will bar entry of citizens of Iran, Libya, Syria, Somalia, Sudan and Yemen for 90 days. Iraq has been taken off the list although it was included in the first ban.

Hawaii argued that the travel ban would harm its economy because of the loss of tourism and the ability to recruit international students.

"Hawaii primarily asserts two proprietary injuries stemming from the Executive Order. First, the State alleges the impacts that the Executive order will have on the University of Hawaii system, both financial and intangible," Watson wrote in his ruling.

"The second proprietary injury...is to the State's main economic drive:tourism," said the judge.

Hawaii has become the first state in the United States to file a lawsuit against Trump's revised travel ban.

Watson's ruling was the second major setback for Trump in his pursuit of a policy to limit immigrants flowing into the United States. The initial travel ban imposed on Jan. 27 was also halted by a federal court following legal challenges across the country.

Trump on Wednesday night slammed the federal court ruling as "an unprecedented judicial overreach," pledging to take the legal fight all the way to the Supreme 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 at a campaign rally in Nashville, the state of Tennessee, suggesting the ruling was made for "political reasons."

"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."

"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 in the first place."