President Donald Trump renewed his attack on the courts Wednesday, describing them as "so political" as a panel of judges weigh his executive order barring refugees and visitors from seven mainly Muslim countries.
The contentious ban has been frozen by the courts and has embroiled Trump in an arm wrestle with the judicial branch, less than three weeks into his presidency.
Speaking to police chiefs and sheriffs, Trump condemned as "disgraceful" a hearing Tuesday in which three federal appeals judges heard arguments appeared skeptical about the government's case to reinstate the ban.
"Courts seem to be so political," he said.
Trump's comments have sparked a firestorm in a country where such personal and vitriolic attacks by a president on another, independent branch of government are rare.
The uproar extended to Trump's own Supreme Court nominee Neil Gorsuch.
He described Trump's attack on the Seattle judge who froze the ban as "disheartening" and "demoralizing," according to spokesman Ron Bonjean.
Trump's ban was suspended nationwide on Friday, after two US states sought to have it overturned on grounds of religious discrimination and because it had caused "irreparable injury."
New attorney general
The agency tasked with defending the ban in court amid the legal standoff got its new chief, after the US Senate overrode fierce opposition to confirm Jeff Sessions as attorney general.
His nomination process saw fierce debate about his civil rights record and Democratic concern over whether he serves as the top US law enforcement officer independent from President Donald Trump.
In the hearing before the Ninth Circuit Court of Appeals, a Justice Department lawyer argued that the president had clear authority to order the ban on national security grounds.
"This is a traditional national security judgment that is assigned to the political branches and the president," August Flentje said.
Critics of the ban claim it violates the US Constitution by discriminating against people on the basis of their religion.
"Has the government pointed to any evidence connecting these countries with terrorism?" asked Judge Michelle Friedland, who was appointed by Barack Obama.
Flentje said the government had not had an opportunity to present such evidence, given the speed at which the case had moved.
The court must decide whether to maintain the lower court's suspension, modify it or lift it. The ruling by the judges - two were appointed by Democratic presidents and a third by a Republican - is expected before the end of the week.
The case is likely to eventually wind up on appeal in the US Supreme Court, which currently is short-handed and evenly divided between liberal and conservative justices. A tie there would leave in place the appeals court decision.
Should Trump's nominee to fill the vacant seat be confirmed by the Senate, he could break the tie.
'Horrible, dangerous and wrong'
Trump vented his frustration in tweets, referring to the ban's suspension as "the horrible, dangerous and wrong decision."
He went further in a rambling speech to the law enforcement chiefs, which at points drew polite applause.
"It's really incredible to me that we have a court case that's going on so long," he said.
Trump then read out the text of a law - interspersed with his commentary - that confers on the president authority to suspend entry to any alien or class of alien deemed detrimental to the interests of the United States.
His 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.
Top administration officials have argued it is needed to keep out Islamic State and Al-Qaeda fighters migrating from Middle East hotspots, insisting time is needed to implement stricter vetting procedures.
Travel analysis firm ForwardKeys says travel bookings to the United States fell 6.5 percent the week after the ban, compared to last year, with a sharp drop in numbers from the targeted countries.
The sudden rollout of the restrictions, and their blanket nature, sparked protests and international condemnation. Polls now show eroding public support for the move in the United States, amid jubilant scenes at airports of returning immigrants.
Shifting the blame to his security advisers, Trump said he had proposed giving a one-month notice, but his law enforcement experts told him "people will pour in before the toughness."
"I think it's sad, I think it's a sad day," Trump said.
"I think our security is at risk today, and it will be at risk until such time as we are entitled and get what we are entitled to as citizens of this country, as chiefs, as sheriffs of this country. We want security."