A San Francisco-based appeals court on Thursday delivered a stinging rebuke of President Trump's executive order on immigration and refugees, rejecting the administration’s request to resume the travel ban and setting up a potential showdown in the Supreme Court.

The 9th U.S. Circuit Court of Appeals ruled unanimously that a nationwide restraining order against Trump’s temporary travel ban may continue while a federal judge considers a lawsuit over the policy, and it forcefully asserted the judiciary’s independent authority to act as a check on executive power.

"We hold that the government has not shown a likelihood of success on the merits of its appeal, nor has it shown that failure to enter a stay would cause irreparable injury, and we therefore deny its emergency motion for a stay," the court said. ADVERTISEMENT The three-judge panel hearing the case included Judges William C. Canby Jr., a Jimmy Carter appointee; Richard R. Clifton, a George W. Bush appointee; and Michelle T. Friedland, a Barack Obama Barack Hussein ObamaGOP senator blocks Schumer resolution aimed at Biden probe as tensions run high D-Day for Trump: September 29 Obama says making a voting plan is part of 'how to quarantine successfully' MORE appointee. The decision is narrowly focused on the question of whether the ban should be blocked while the courts consider its lawfulness — but the three-judge panel nevertheless issued a scathing takedown of almost all of the government’s arguments. Trump immediately fired back on the ruling, tweeting: “SEE YOU IN COURT, THE SECURITY OF OUR NATION IS AT STAKE!” In the short term, the ruling means that refugees and immigrants from seven Muslim-majority countries can continue to enter the U.S. under normal vetting procedures. The case is expected to be quickly appealed to the Supreme Court, which remains short-handed. A 4-4 deadlock would leave the 9th Circuit’s ruling in place. Washington state Attorney General Bob Ferguson, who had sued over the ban, said that the 9th Circuit decision “effectively granted everything we sought.” The strongly worded decision comes amid continuing controversy over Trump’s attacks on the federal judge who issued the initial restraining order, James Robart, a George W. Bush appointee. The president earlier in the week referred to Robart as a “so-called judge," calling his ruling “ridiculous.”

The appeals court ruled that not only was the government unable to demonstrate that leaving the restraining order in place would cause irreparable injury, it was not able to convince the court that its appeal was even likely to be successful — a critical standard that it must meet at this early stage in the process.

Perhaps most centrally, the court dinged the administration for failing to provide evidence that an alien from any of the countries named in Trump’s order had carried out a terrorist attack in the United States.

Justice Department lawyer August Flentje had argued in a hearing Tuesday that blocking the order “overrides the President’s national-security judgment about the level of risk” — in other words, that Trump’s determination that there was a sufficient danger to justify the ban should have been adequate evidence for the court to allow it to proceed.

But the 9th Circuit, writing as a unified court, was unconvinced, saying that the argument “runs contrary to the fundamental structure of our constitutional democracy.”

"Rather than present evidence to explain the need for the Executive Order, the Government has taken the position that we must not review its decision at all. We disagree," they wrote.

"In short, although courts owe considerable deference to the President's policy determinations with respect to immigration and national security, it is beyond question that the federal judiciary retains the authority to adjudicate constitutional challenges to executive action."

The controversial order, levied late last month, banned travelers from Iran, Iraq, Syria, Yemen, Sudan, Libya and Somalia for 90 days and almost immediately sparked legal challenges, including this one on behalf of the states of Minnesota and Washington. The order also suspended the refugee resettlement program for 120 days, with an indefinite ban on refugees from Syria.

The states argued that the ban was motivated by religious discrimination, violated due process rights and endangered U.S. national security, rather than enhanced it.

The Trump administration was unable to convince the court that the ban did not violate due process rights — such as providing notice and a hearing prior to restricting an individual’s ability to travel.

The government had argued that due process rights were not violated because the White House counsel, several days after the ban was implemented, issued guidance stating that the order did not apply to green card holders — and that other individuals were not citizens and therefore had no due process rights.

The court, whose decision does not strictly rule on the constitutionality of the order itself, rejected both arguments, raising red flags for its arguments in legal battles to come.

The protections provided by the Fifth Amendment are not limited to citizens, the court insisted — before going on to chide the administration for its “shifting interpretations” of the order.

“We cannot say that the current interpretation by White House counsel, even if authoritative and binding, will persist past the immediate stage of these proceedings,” they wrote.

The panel reserved judgment on whether the ban constitutes religious discrimination, but argued that the states had raised “serious allegations and present significant constitutional questions.”

While Democrats praised the ruling as a victory for religious liberty, conservatives immediately leapt on the ruling as a sign of a politicized judiciary.

“No foreigner has a constitutional right to enter the United States and courts ought not second-guess sensitive national-security decisions of the president,” Sen. Tom Cotton Tom Bryant CottonLoeffler calls for hearing in wake of Netflix's 'Cuties' Health care in the crosshairs with new Trump Supreme Court list Cruz says he wouldn't accept Supreme Court nomination MORE (R-Ark.) said in a statement that called the 9th Circuit “the most notoriously left-wing court in America.”