Moments after the ruling, Mr Trump had tweeted: "SEE YOU IN COURT, THE SECURITY OF OUR NATION IS AT STAKE!"
"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". Officials also noted that the administration could both revise the order and appeal the court's ruling.
Republican lawmakers jumped to Trump's defense, with Senator Tom Cotton calling the ruling "misguided", while Democrats hailed it. The Homeland Security Department said it was no longer directing airlines to prevent affected visa holders from boarding USA -bound planes.
The legal fight involves two divergent views of the role of the executive branch and the court system.
Attorney Julie Goldberg flew to Los Angeles this week with 27 clients who had been stuck in Djibouti when Trump's order took effect. The executive order had set off chaos as states, companies, universities, citizens and refugees struggled with the ramifications.
"The order is limited to the countries identified by Congress".
Opponents of the travel ban, led by Washington state and Minnesota and including almost 20 other states, former national security officials and leading technology companies, say the ban discriminates against citizens of certain countries and the Muslim religion. Until a final decision is handed down, it seems certain that Judges Robart, Friedland, Canby and Clifton won't get the last word.
Only 15 percent of the world's Muslims are affected by the executive order, the judge said, citing his own calculations. "It shows that the courts are going to be there when President Trump uses his power and exceeds his constitutional authority".More news: One-third of Americans unaware ObamaCare, ACA are the same
But Kari Hong, an assistant professor at Boston College Law School, said Tuesday's hearing was technical in nature.
"The courts have been begging [the Justice Department] to provide some evidence and none has been forthcoming", she said, claiming the order has "all types of deficiencies".
But there is no question that its rollout was sloppy and arrogant - and that includes the legal defense the government mounted when inevitably challenged in court.
Since US District Judge James Robart temporarily blocked Trump's ban, refugees and travellers have been rushing to the US.
During an oral argument lasting more than an hour, a three-judge panel of the 9th US Circuit Court of Appeals pressed a government lawyer on Tuesday over whether the Trump administration's national security argument was backed by evidence that people from the seven nations posed a danger.
Contrary to the claims of US government lawyers, the appellate panel ruled that many precedents showed it had the authority "to adjudicate constitutional challenges to executive action" and to question claims that an executive action was done to protect the nation's security. That should make the government think twice before going to the Supreme Court, he said.
With the prime minister of America's closest ally in the far east just to his right, Trump also renewed security promises to Japan regarding islands in the East China Sea, where Abe's nation has had territorial disputes with China. The federal government was ordered to submit its opposition to such a motion by midnight February 15, and the states were told to reply to that by February 17.
Two Yemeni brothers whose family has sued over the travel ban, and who'd been turned away in the chaotic opening days of the order, arrived at Dulles International Airport in Virginia, where they were greeted by their father.