Donald Trump’s resolve to prevent citizens from six Muslim-majority countries from entering the US has suffered yet another setback, after a judge put his revised travel ban on hold.

Derrick Watson, a US district judge in Hawaii, ordered the temporary stay just hours before Trump’s action  was due to come into effect at midnight. The nationwide ruling means that people should not be impacted by the order.

At a rally in Nashville President Trump described the judge’s action an “unprecedented judicial overreach” and said he was ready to take the case “as far as it needs to go” including to the Supreme Court.

“A judge has just blocked our executive order on travel and refugees coming into our country from certain countries”, Trump said.

“The order he blocked was a watered-down version of the first order that was also blocked by another judge and that should never have been blocked to start with …

“This is, in the opinion of many, an unprecedented judicial overreach,” he added.

Meanwhile, the Associated Press said that a group of 58 tech companies, including Airbnb, Lyft and Dropbox, filed a “friend of the court’ brief in the Hawaii case saying the order hurt their ability to recruit the best talent from around the world.

A longer list of companies, which included giants such as Apple, Facebook and Google, filed a brief opposing the first ban in a different court challenge brought by Washington state, which is ongoing.

Judge Watson was one of three federal judges across the US that listened to legal arguments on Wednesday. Up to half-a-dozen states are seeking to block the executive order and judges in Maryland and the state of Washington also heard cases.

Trump had issued a revised travel ban after his first one sparked international protests and suffered several legal setbacks from courts who judged it unconstitutional. He had hoped the new order, which did not involve green card holders and which removed any reference to religion, would be legally more watertight.

But activists said the new ban still discriminated, both on the grounds of nationality and indeed religion.

The island state of Hawaii, which has a Democratic governor and legislative assembly, had argued that Trump’s revised order discriminated on the grounds of nationality, and would prevent Hawaii residents from receiving visits from relatives in the six countries named in the ban. It also said the order would harm its crucial tourism industry, and the ability to recruit foreign students and workers. The lawsuit also argued that the order discriminated against Muslims in violation of the US Constitution.

Judge Watson concluded in his ruling that while the order did not mention Islam by name, “a reasonable, objective observer … would conclude that the Executive Order was issued with a purpose to disfavour a particular religion.” Judge Watson was appointed to the bench by former Democratic President Barack Obama.

The judge also cited “questionable evidence supporting the government’s national security motivation”  adding in his 43-page ruling that Hawaii would suffer financially if the executive order goes into effect and blocks the flow of students and tourists to the state.

Trump’s first travel order was more sweeping than the second revised order. Like the current one, it barred citizens of Iran, Libya, Syria, Somalia, Sudan and Yemen from entering the country for 90 days, but it also included Iraq, which was subsequently taken off the list.

Refugees were blocked from entering the country for 120 days in both orders, but an indefinite ban on all refugees from Syria was dropped in the new one.

The revised ban also excluded legal permanent residents and existing visa holders. It provided a series of waivers for various categories of immigrants with ties to the United States.

The Department of Justice called the ruling “flawed both in reasoning and in scope,” adding that the president has broad authority in national security matters. “The Department will continue to defend this Executive Order in the courts,” it said a statement.

The case in Hawaii was one of several that were under motion on Wednesday, after more than half-a-dozen states, including Washington, Oregon, California and New York, said they were going to try and stop Trump’s revised order, which he signed on March 6.