A US appeals court has upheld a decision blocking president Donald Trump's revised ‘travel ban’ on people from six mainly Muslim nations.
Ruling on a case brought by the state of Hawaii, the appeal judges found that the executive order violated existing immigration legislation.
It is a further legal setback for the president's efforts to get the ban he promised his supporters.
Attorney general Jeff Sessions said he disagreed with the ruling.
‘President Trump's executive order is well within his lawful authority to keep the nation safe.’
He added: ‘Recent attacks confirm that the threat to our nation is immediate and real.’
The dispute may end up being decided in the US Supreme Court.
Trump's own tweet from June 5 was cited in the judges' ruling.
An earlier version of the travel ban, issued by Trump just days after taking office, sparked confusion at airports and protests.
In the revised executive order, the 90-day ban was to apply to people from Iran, Libya, Syria, Somalia, Sudan and Yemen. It also called for a 120-day ban on all refugees, but removed references to religious minorities.
During his election campaign, Trump called for a ‘total and complete shutdown of Muslims entering the United States’.
Reacting to the latest ruling, White House spokesman Sean Spicer defended the executive order, saying ‘we need every available tool at our disposal to prevent terrorists entering the United States and committing acts of bloodshed and violence’.
‘We continue to be confident that the president's executive order to protect this country is fully lawful and ultimately will be upheld by the Supreme Court,’ Spicer added.
The Ninth US Circuit Court of Appeals in San Francisco was reviewing a March ruling by a Hawaii-based federal judge that blocked parts of Trump's order.
In their ruling, the judges said that ‘immigration, even for the president, is not a one-person show’.
They said Trump had failed to show that the entry of people from the six countries mentioned in the ban, as well as the refugees, would be detrimental to US interests.
But the judges said the government was allowed to review the vetting process for people entering the US - something the earlier Hawaii ruling had blocked.
Trump has repeatedly said that the ban is necessary to protect Americans from terrorism.
Significant recent attacks in the US were not committed by citizens of any other of the six countries named in the order.
The legal ruling comes on the first anniversary of the Orlando nightclub shooting, in which a US citizen shot dead 49 people at a Florida nightclub. It was the worst mass shooting in US history.
Want stories like this in your inbox?
Sign up to exclusive daily email
More Stories from North America