LOS ANGELES - A US court on Thursday slapped down Donald Trump's effort to bar refugees and nationals from seven Muslim-majority countries from US soil, dealing the new president and his controversial law-and-order agenda a major defeat.
The ruling from the federal appeals court in San Francisco on Trump's executive order, issued on January 27 with no prior warning and suspended a week later, capped a turbulent first three weeks of the Republican's presidency.
"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," the Ninth Circuit Court of Appeals ruled unanimously.
Trump's decree summarily denied entry to all refugees for 120 days, and travelers from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen for 90 days. Refugees from Syria were blocked indefinitely.
The Republican leader was quick to react to the court's decision, tweeting within minutes of its publication: "SEE YOU IN COURT, THE SECURITY OF OUR NATION IS AT STAKE!"
Trump's administration argued the ban was needed to keep out Islamic State and Al-Qaeda fighters migrating from Middle East hotspots, but it sparked travel chaos and was met with condemnation by immigration advocacy groups.
Critics say the measure targeted Muslims in violation of US law.
The court in San Francisco said aspects of the public interest favored both sides, highlighting the "massive attention" the case had drawn.
"On the one hand, the public has a powerful interest in national security and in the ability of an elected president to enact policies," the ruling said.
"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."
While acknowledging that the Seattle judge's ruling "may have been overbroad in some respects," the three appellate judges said it was not their "role to try, in effect, to rewrite the executive order."
"The government has pointed to no evidence that any alien from any of the countries named in the order has perpetrated a terrorist attack in the United States," the court added.
Civil rights campaigners politicians and officials - including the National Iranian American Council, Washington Governor Jay Inslee, whose administration initially applied for the measure to be blocked, and California Attorney General Xavier Becerra - applauded the decision, vowing to fight on until the executive order was permanently dismantled.
"The government's erratic and chaotic attempts to enforce this unconstitutional ban have taken a tremendous toll on innocent individuals, our country's values and our standing in the world," Omar Jadwat of the American Civil Liberties Union said in a statement.
The Republican leader had blasted the original suspension, labelling the Seattle federal judge who issued it as a "so-called judge" and branding the courts "disgraceful" and politicized.
Echoing Trump, Homeland Security Secretary John Kelly - who is in charge of enforcing the immigration ban - has said the courts do not understand the threat the country faces.
"In their world it is very academic, almost in a vacuum. In their courtrooms, they are protected by people like me," Kelly told lawmakers.
Earlier in the day, Trump defended his hardline policies as he declared a "new era of justice" in America and swore in his attorney general Jeff Sessions.
The property mogul-turned-president also signed three executive orders designed to burnish his law-and-order credentials.
The first created a task force on violent crime, the second is aimed at tackling crime directed at law enforcement officials and the last tasks officials with looking at how the United States tackles organized crime syndicates.
"We face the menace of rising crime and the threat of deadly terror," said the Republican leader, doubling down on his dystopian vision of America.
"A new era of justice begins and it begins right now," he said.
The rate of violent crime in America's 30 largest cities rose slightly last year but remains near historic lows, according to the Brennan Center, an independent think tank.
Trump's tough talk belies a political and legislative agenda that has been beset by missteps and legal challenges.
The blowback from Trump's outbursts over the travel ban suspension showed no signs of abating, with his own Supreme Court nominee describing the president's comments as "disheartening" and "demoralizing."
Opposition Democrats echoed those criticisms, but suggested the nominee, Neil Gorsuch, was trying to smooth his nomination by appearing as an independent voice.
Though Trump's message has been criticized by experts, it appears to be resonating with supporters.
The billionaire won the election last November with 46 percent of the popular vote, and the RealClearPolitics average of polls shows his job approval at about that level, with the split largely along Republican-Democratic lines.
Trump on Wednesday trumpeted a Morning Consult-Politico poll showing 55 percent voter approval for his immigration ban, with 38 percent disapproving.
Previous studies - which the president dismissed as "fake news" - had shown a majority of Americans opposing the measure.