US President Donald Trump on Saturday took to Twitter to blast a federal judge's decision to halt his immigration order nationwide.

"The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned!" he tweeted.

Federal Judge James Robart, a George W. Bush appointee who presides in Seattle, temporarily stopped the order on Friday night.

US Customs and Border Protection (CBP) then alerted airlines the US government would quickly begin reinstating visas that were previously cancelled, and also advised airlines that refugees who are in possession of US visas will be admitted as well, an airline executive said.

Trump sent out a series of tweets lamenting the ruling that halted enforcement.

"When a country is no longer able to say who can, and who cannot, come in & out, especially for reasons of safety &.security – big trouble!" he tweeted.

A chaotic Friday night set up the nation for a second straight weekend of widespread uncertainty over the controversial ban, this time with the administration on defence, reported CNN. 

The White House first called the order "outrageous" and then dropped that word minutes later in a second statement.

"At the earliest possible time, the Department of Justice (DoJ) 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," White House Press Secretary Sean Spicer said in a statement. 

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

Trump's executive order that he signed last week suspended immigration from seven Muslim-majority countries for 90 days, the US refugee programme for 120 days and indefinitely halted Syrian refugees from entering the US.

The ruling came on the heels of its first legal victory over the travel ban. 

The sweeping ruling from the Seattle judge came just hours after a different ruling from a federal judge in Boston, who declined to renew a temporary restraining order in Massachusetts.

Washington Attorney General Bob Ferguson hailed the case as "the first of its kind" and declared that it "shuts down the executive order immediately". 

This suit was brought by the states of Washington and Minnesota against the travel ban. Democrats, including Senate Minority Leader Chuck Schumer, immediately hailed Robart's order.

"This ruling is a victory for the Constitution and for all of us who believe this un-American executive order will not make us safer," said Schumer.

"President Trump should heed this ruling and he ought to back off and repeal the executive order once and for all."

"What we're seeing here is the courts standing up to the unconstitutional ban that President Trump imposed," said Omar Jadwat, director of the Immigrants' Rights Project at the American Civil Liberties Union (ACLU). 

The Council on American-Islamic Relations (CAIR), the Muslim civil rights organisation, welcomed the ruling.

"Because the Trump administration is vowing to appeal the ruling, CAIR is urging travellers to consider immediately contacting relevant airlines to inquire about rebooking their flights, with the recognition that the situation remains fluid," the group said.