However, the White House has said it expects the courts to reaffirm president Donald Trump’s executive power and support the restrictions.
The case looks set to extend into today, with fresh legal filings due.
Observers have also predicted that the Supreme Court ultimately will have a say.
The San Francisco-based 9th US Circuit Court of Appeals, in a brief order, denied the administration’s request to set aside a Seattle judge’s ruling that put a temporary hold on the travel ban nationwide.
The lawsuit by Washington state and Minnesota said Mr Trump’s order harmed residents and effectively mandated discrimination.
“We’ll accomplish the stay and will win the case on the merits,” Vice-President Mike Pence said.
Members of Mr Trump’s Republican Party scolded him for Twitter attacks on US District Court Judge James Robart, who was appointed by president George W Bush.
Lawmakers also accused Mr Trump of stepping over the line that separates the executive from the judiciary. To Mr Trump, Mr Robart is a “so-called judge” whose “ridiculous” ruling “will be overturned”.
“The president can criticise anybody he wants,” Mr Pence said, adding that he believed the American people would “find it very refreshing that they not only understand this president’s mind, but they understand how he feels about things”.
At issue is the legality of a presidential action undertaken in the name of national security. “The president is not a dictator,” said Senator Dianne Feinstein. “He is the chief executive of our country. And there is a tension between the branches of government.”
The government had told the appeals court that the president alone has the power to decide who can enter or stay in the United States – an assertion that appeared to invoke the wider battle to come over illegal immigration.
Congress “vests complete discretion” in the president to impose conditions on entry of foreigners to the US, and that power is “largely immune from judicial control”, according to the court filing. “We don’t appoint judges to our district courts to conduct foreign policy or to make decisions about the national security,” Mr Pence said.
Mr Feinstein, the top Democrat on the Senate Judiciary Committee, predicted the appeals court would not have the last word.
“I have no doubt that it will go to the Supreme Court, and probably some judgments will be made whether this president has exceeded his authority or not,” she said.
In his ruling, Mr Robart said it was not the court’s job to “create policy or judge the wisdom of any particular policy promoted by the other two branches”, but to make sure that an action taken by the government “comports with our country’s laws”.
Mr Trump’s order applied to Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen – Muslim-majority countries the administration said raise terrorism concerns. The order had caused confusion for many foreigners trying to reach the US, prompted protests and led to multiple court challenges.
Mr Trump’s criticism of Mr Robart echoed campaign comments against a federal judge of Mexican heritage who was overseeing a lawsuit against Trump University. Justice Department lawyers could be called upon to answer for Mr Trump’s words as the travel ban case makes its way through the courts.
“We all get disappointed from time to time at the outcome in courts on things that we care about,” said Senate Majority Leader Mitch McConnell. “But I think it is best to avoid criticising judges.”