A federal judge has put a nationwide block on US President Donald Trump's week-old executive order temporarily barring refugees and nationals from seven Muslim-majority countries from entering the United States.

The temporary restraining order issued by US District Judge James Robart in Seattle on Friday will remain valid nationwide pending a full review of a complaint by Washington state's attorney general, Bob Ferguson.

"The constitution prevailed today," Ferguson said, describing the judge's decision as historic. "No one is above the law, not even the president.

"Not everybody may like this decision - I'm certain the president will not like this decision - but it is his job, it is his responsibility, it is his obligation as president to honour it and I'll make sure he does."

Friday's ruling was not the first to challenge the travel ban, but it was the most sweeping as it effectively vacated the main tenets of the order.

Ferguson said the order technically means that anyone with a valid visa must be allowed entry into the country by Customs and Border Protection (CBP).

The CBP has issued an advisory to airlines, instructing them to board travellers affected by the ban.

The US state department is working with the Department of Homeland Security to work out how Friday's ruling affects its operations, a spokesman told Reuters news agency, and will announce any changes affecting travellers as soon as information is available.

The justice department made no immediate decision on an appeal but said in a statement it would determine its next steps after reviewing the written order.

The White House said it would file an appeal as soon as possible.

"At the earliest possible time, the Department of Justice intends to file an emergency stay of this outrageous order and defend the executive order of the president, which we believe is lawful and appropriate," the White House said in a statement.

IN Photos: NYC Yemenis close bodegas to protest Trump travel ban

"The president's order is intended to protect the homeland and he has the constitutional authority and responsibility to protect the American people."

Al Jazeera's Shihab Rattansi, reporting from Washington, DC, said the legal ramifications of Friday's block were "still very much up in the air", as was the difference it would make for the at least 60,000 people whose visas have been revoked.

"Even though the executive order has been suspended temporarily, they may still have to apply for a new visa before they can gain entry. And anyway, all of this can change legally just in a matter of days."

Robart's decision came after Ferguson filed a suit to invalidate key provisions of Trump's executive order, which bars Syrian refugees indefinitely and blocks citizens of Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen from entry into the US for 90 days. Refugees from countries other than Syria are barred from entry for 120 days.

The state department said on Friday that up to 60,000 foreigners from the seven countries concerned had their visas cancelled as a result of the order. A justice department lawyer, however, told a court hearing in Virginia that about 100,000 visas had been revoked.

'Battle not over'

Washington Governor Jay Inslee welcomed the ruling as a "tremendous victory" but warned that the battle to overturn Trump's executive order was not over.



"There is still more to do," he said in a statement. "The fight isn't yet won. But we should feel heartened by today's victory and more resolute than ever that we are fighting on the right side of history."

Ferguson said in his complaint that the president's ban violated the constitutional rights of immigrants and their families as it specifically targets Muslims.

However, attorneys representing the Trump administration argued that as president, he had broad powers and was within his right to issue an order that protects Americans.

Trump's order has been met with an uproar by rights groups and immigration attorneys who say it specifically targets Muslims and has unfairly affected families, many of them US citizens.

The White House argues that the ban is aimed at making the country safer.