A US judge in Seattle has issued a temporary nationwide block on President Donald Trump’s ban on travellers from seven mainly Muslim nations.
Federal Judge James Robart ruled against government lawyers’ claims that US states did not have the standing to challenge Mr Trump’s executive order.
Last week’s order has led to protests and confusion at US airports.
Customs officials have told US airlines that they can resume boarding banned travellers while a legal case is heard.
Gulf carrier Qatar Airways told Reuters news agency it would start accepting all passengers with valid travel documents.
The administration, however, could again block them if it were to win an emergency stay. The justice department says it will appeal against the Seattle ruling.
In a statement, the White House described Mr Trump’s directive as “lawful and appropriate”.
“The president’s order is intended to protect the homeland and he has the constitutional authority and responsibility to protect the American people,” the statement said.
Mr Trump’s order suspended the US Refugee Admissions Programme for 120 days.
There is also an indefinite ban on Syrian refugees. Anyone arriving from Iraq, Syria, Iran, Libya, Somalia, Sudan or Yemen faces a 90-day visa suspension.
Dozens of lawsuits have been filed against the executive order since it was signed by Mr Trump a week ago but this is the first time a nationwide order has been granted – temporarily voiding the president’s ban.
But the order could be reinstated once the justice department files a motion to quash the Seattle court’s ruling. In a statement the White House initially called it “outrageous”, before withdrawing that description.
The executive order caused chaos when it was suddenly introduced a week ago – some travellers arriving in the US were turned back, and protests broke out at airports across the country. The Seattle judge issued his order on the grounds that the travel ban could be unconstitutional – an argument that could be challenged all the way to the Supreme Court.
An estimated 60,000 people from the seven countries affected had their visas cancelled because of the ban. The customs department said those visas would now be reissued, and the people involved were free to travel to the US.
The lawsuit against President Trump’s ban was initially filed by Washington State, with Minnesota joining later.
Washington state Attorney General Bob Ferguson described the ban as unconstitutional.
“Folks who had visas, folks who were allowed to travel were denied that right without any due process whatsoever – that’s un-American and unconstitutional,”
The order, Mr Ferguson added, also violated freedom of religion rights. “You cannot prefer one religion over another,”
Mr Trump has argued that his directive is aimed at protecting America. Critics respond by saying that most terror attacks in the US in recent years have been carried out by home-grown militants.
The president said visas would once again be issued once “the most secure policies” were in place, and denied it was a ban on Muslims.
Courts in at least four other states – Virginia, New York, Massachusetts and Michigan – are hearing cases challenging Mr Trump’s executive order.
Earlier on Friday, a judge in Boston declined to extend a temporary ban that prohibited the detention or removal of foreigners legally authorised to come to America.
The ban – which only applied to Massachusetts – is due to expire on 5 February.