(CNN) The challenge to President Donald Trump's refugee order has escalated toward an epic showdown over presidential power, judicial authority and American identity.

By their questions in a hearing Tuesday, three US appeals court judges made plain that even at this early procedural stage they are concerned about the administration's potential targeting of Muslims along with possible risks to national security.

The judges of the Ninth Circuit Court of Appeals also expressed unease with how quickly they were being pressed to consider looming dilemmas of refugee policy with no lower court hearings yet on both sides' evidence.

"Courts must act fast!" Trump tweeted late Monday, as he warned about "a threat from radical Islamic terrorism."

Trump's natural impatience conflicts with the usual tendencies of the federal judiciary, which even in dangerous times attempts, as Chief Justice John Roberts has observed, "calmly to poise the scales of justice."

Trump's January 27 order suspending refugee admissions for at least 120 days and barring people from seven majority-Muslim countries from entering the US for at least 90 days, has engendered more public protest and litigation than any of Trump's policy moves or Cabinet appointments to date.

More than anything else, it cuts to the core of the nation's character.

Among the "friend of the court" briefs filed ahead of the Ninth Circuit hearing was one from technology companies that addressed lost talent and revenue related to the ban but first highlighted America's reputation as a nation that welcomed immigrants.

"A quarter of us have at least one parent who was born outside the country," it said, referring to population statistics. "Close to half of us have a grandparent born somewhere else. Nearly all of us trace our lineage to another country."

The order also raises concerns that the nation would favor Christians over Muslims. The directive gives priority to refugee claims based on religious persecution but only "if the religion of the individual is a minority religion" in his home country. Given the list of countries targeted, the challengers say, that provision discriminates against Muslims.

In the administration's written filings and during arguments Tuesday, the federal government argued that the order was neutral with respect to religion and rightly focused on countries that have been breeding grounds for terrorism.

While trial judges across the country have been reviewing claims that the order exceeds the president's statutory and constitutional power, Tuesday's hearing marked the first time a federal appeals court took up a piece of the controversy.

It heard the Trump administration's appeal of US District Court Judge James Robart's order in a case brought by officials in Washington state and Minnesota preventing enforcement of the travel ban while litigation is underway.

Trump condemned Robart, referring to him as a "so-called judge" and deeming his ruling "ridiculous."

Wednesday morning, he insisted the government must win the case.

"If the U.S. does not win this case as it so obviously should, we can never have the security and safety to which we are entitled. Politics!" Trump tweeted.

If the U.S. does not win this case as it so obviously should, we can never have the security and safety to which we are entitled. Politics! — Donald J. Trump (@realDonaldTrump) February 8, 2017

Do Trump's campaign promises matter?

Appeals court judges expressed doubts about the government's terrorism claims but also pressed Washington state Solicitor General Noah Purcell about the broad reach of the order. They questioned whether to consider comments by Trump during the presidential campaign, such as the promise of "a total and complete shutdown of Muslims entering the United States."

The Washington and Minnesota lawyers say judges should look to such statements and "distinguish a sham" purpose from a sincere one. Trump administration lawyers counter that the order can only be read on its face. They stress overall that judges "are particularly ill equipped to second guess" the President on security risks.

If the administration loses at this stage, it is likely to appeal to the Supreme Court for reinstatement of the ban.

But at this early point, with the Supreme Court still down a justice from last year's death of Antonin Scalia, it might be disinclined to take up the matter. The current bench is divided 4-to-4 along ideological and political lines.

Trump's nominated successor to Scalia, US Appeals Court Judge Neil Gorsuch, is unlikely to be on the bench before late spring.

A reminder of Korematsu

Still many more chapters could unfold in the dispute already raising comparisons to past legal clashes over presidential power at times of war and national crisis.

For the challengers, the dispute particularly recalls the 1944 case of Korematsu v. United States, in which the Supreme Court upheld a World War II executive order moving Japanese-American citizens into detention camps.

Since regarded as an egregious infringement on civil rights and one of the high court's worst decisions ever, Korematsu often emerges at judicial confirmation hearings.

During Chief Justice John Roberts' 2005 confirmation hearings, Sen. Patrick Leahy, a Vermont Democrat, asked whether Roberts would be a "Korematsu justice" and allow individuals to be targeted based on nationality or religion.

Roberts responded that the government was unlikely to resort ever again to such internment camps, yet also emphasized the need for constitutional vigilance when national security is under threat.

Roberts told senators he was reminded of a judicial motto tracing to the 1807 treason trial of Aaron Burr, that a judge's obligation even in dangerous times is "calmly to poise the scales of justice."