A federal appeals court refused Thursday to reinstate U.S. President Donald Trump's ban on travellers from seven predominantly Muslim nations, unanimously rejecting the administration's claim of presidential authority, questioning its motives and concluding that the order was unlikely to survive legal challenges.

The three judges of the San Francisco-based 9th U.S. Circuit Court of Appeals said the argument that the ban targets Muslims raised "serious allegations" and presented "significant constitutional questions," and they agreed that courts could consider statements by Trump and his advisers about wishing to enact such a ban.

Moments after the ruling, Trump tweeted:

SEE YOU IN COURT, THE SECURITY OF OUR NATION IS AT STAKE! —@realDonaldTrump

In response, Washington Gov. Jay Inslee, a Democrat who leads one of the states that challenged the ban, said: "Mr. President, we just saw you in court, and we beat you."

The panel declined to block a lower-court ruling that suspended the ban and allowed previously barred travellers to enter the U.S. But it did not shy away from the larger constitutional questions raised by the order.

William Canby is one of three judges on the San Francisco-based 9th Circuit Court of Appeals who unanimously ruled to uphold the suspension of Trump's travel ban. (Ross D. Franklin/Associated Press)

The judges sided with the states on every issue except for one technical matter. They rejected the administration's argument that courts did not have the authority to review the president's immigration and national security decisions. They said the administration failed to show that the order met constitutional requirements to provide notice or a hearing before restricting travel. And they said the administration presented no evidence that any foreigner from the seven countries was responsible for a terrorist attack in the U.S.

"Despite the district court's and our own repeated invitations to explain the urgent need for the Executive Order to be placed immediately into effect, the Government submitted no evidence to rebut the States' argument that the district court's order merely returned the nation temporarily to the position it has occupied for many previous years," the panel wrote.

Battle far from over

The court battle is far from over. An appeal to the U.S. Supreme Court seems likely. That could put the decision in the hands of a divided court that has a vacancy. Trump's nominee, Neil Gorsuch, is unlikely to be confirmed in time to take part in any consideration of the ban, which was set to expire in 90 days unless it is changed.

Trump shakes hands with his Supreme Court justice nominee Neil Gorsuch. Gorsuch would not be confirmed in time to take part in any consideration of the ban should it go to the Supreme Court. (Carolyn Kaster/Associated Press)

The appellate judges noted compelling public interests on both sides.

"On the one hand, the public has a powerful interest in national security and in the ability of an elected president to enact policies. And on the other, the public also has an interest in free flow of travel, in avoiding separation of families, and in freedom from discrimination."

The Justice Department said it was "reviewing the decision and considering its options." It's the first day on the job for new Attorney General Jeff Sessions, who was sworn in at the White House earlier Thursday by Vice-President Mike Pence.

The judges hammered away at the administration's claim that the ban was motivated by terrorism fears, but they also challenged the states' argument that it targeted Muslims. (Jeff Chiu/Associated Press)

Last week, U.S. District Judge James Robart in Seattle issued a temporary restraining order halting the ban after Washington state and Minnesota sued. The ban temporarily suspended the nation's refugee program and immigration from countries that have raised terrorism concerns.

Justice Department lawyers appealed to the 9th Circuit, arguing that the president has the constitutional power to restrict entry to the United States and that the courts cannot second-guess his determination that such a step was needed to prevent terrorism.

The states said Trump's travel ban harmed individuals, businesses and universities. Citing Trump's campaign promise to stop Muslims from entering the U.S., they said the ban unconstitutionally blocked entry to people based on religion.

Judge Richard Clifton, of the 9th U.S. Court of Appeals, said only 15 per cent of the world's Muslims are affected by the executive order, citing his own calculations. (Las Vegas Review-Journal via AP)

The appeals court sided with the administration on just one issue. The states had argued that 9th Circuit precedent prohibits review of temporary restraining orders. The panel said that due to the intense public interest at stake and the uncertainty of how long it would take to obtain a further ruling from the lower court, it was appropriate to consider the federal government's appeal.

'We're not in a normal time'

Josh Blackman, a professor at South Texas College of Law in Houston, said the "million-dollar question" is whether the Trump administration would appeal to the Supreme Court.

Judge Michelle T. Friedland, right, questioned whether the government has 'pointed to any evidence connecting these countries to terrorism.' (Eric Risberg/Associated Press)

That could run the risk of having only eight justices to hear the case, which could produce a tie and leave the lower-court ruling in place.

"There's a distinct risk in moving this too quickly," Blackman said. "But we're not in a normal time, and Donald Trump is very rash. He may trump, pardon the figure of speech, the normal rule."

Jessica Levinson, a professor at Loyola Law School, said the ruling was thoughtful and supported by a great deal of legal precedent. More important, it was unanimous despite the fact that the panel included judges appointed by Democratic and Republican presidents.

"It's a very important message that judges are not just politicians in robes and not just political hacks," Levinson said. "The role of the judge is to transcend politics. That's why they're appointed for life, so they don't worry about what's popular. They worry about what's legally correct."

After the ban was put on hold, the State Department quickly said people from the seven countries — Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen — with valid visas could travel to the U.S. The decision led to tearful reunions at airports around the country.