A second federal appeals court has upheld a decision blocking President Donald Trump's revised travel ban.
The ruling from a unanimous three-judge panel of the 9th US Circuit Court of Appeals deals the administration another legal defeat as the Supreme Court considers a separate case on the issue.
The judges say the president violated US immigration law by discriminating against people based on their nationality and that Mr Trump failed to show their entry into the country would hurt American interests.
They did not rule on whether the travel ban violated the Constitution's ban on the government officially favouring or disfavouring any religion.
The 4th US Circuit Court of Appeals in Virginia also ruled against the travel ban on May 25.
The administration has appealed that ruling to the Supreme Court.
The 9th Circuit, which heard arguments in Seattle last month in Hawaii's challenge to the ban, ruled based on immigration law, not the Constitution.
"Immigration, even for the president, is not a one-person show," the judges said.
"The president's authority is subject to certain statutory and constitutional restraints."
Judges Michael Hawkins, Ronald Gould and Richard Paez - all appointed by President Bill Clinton - said the president's order did not tie citizens of Iran, Libya, Somalia, Sudan, Syria and Yemen to terrorist organisations or contributors to "active conflict".
It also did not provide any link between their nationality and their propensity to commit terrorism.
"In short, the order does not provide a rationale explaining why permitting entry of nationals from the six designated countries under current protocols would be detrimental to the interests of the United States," the panel said.
Because of the conflict with immigration law, the judges said they did not need to consider whether it also violated the Constitution's prohibition on the government favouring or disfavouring any religion.
The 4th Circuit found the policy unconstitutional on that basis.
The 9th Circuit also kept blocking Mr Trump's suspension of the US refugee programme.
The court said he was required to consult with Congress in setting the number of refugees allowed into the country in a given year and that he could not decrease it midyear.
The refugee programme is not at issue in the 4th Circuit case.
Mr Trump issued his initial travel ban on a Friday in late January, bringing chaos and protests to airports around the country.
A Seattle judge blocked its enforcement nationwide in response to a lawsuit by Washington state - a decision that was unanimously upheld by a different three-judge 9th Circuit panel.
The president then rewrote his executive order rather than appeal to the US Supreme Court at that time.
The new version, designed to better withstand legal scrutiny, named six countries instead of seven - dropping Iraq - and spelled out more of a national security rationale.
It also listed some reasons that travellers from those nations might be granted waivers allowing them into the US despite the policy.
Several states and civil rights groups also challenged the revised ban, saying it remained rooted in discrimination and exceeded the president's authority.
In March, US District Judge Derrick Watson in Hawaii blocked the new version from taking effect, citing what he called "significant and unrebutted evidence of religious animus" in Mr Trump's campaign statements.
The 9th Circuit narrowed Mr Watson's ruling in some minor ways, allowing the administration to conduct an internal review of its vetting procedures for refugees and visa applicants.