The Department of Homeland Security complied with a judge’s orders Saturday and stopped enforcing President Trump’s controversial entry ban, and the fast-moving legal dispute over the president’s powers could land at the nation’s highest court.

On Saturday evening, Trump administration lawyers filed a notice to appeal the Seattle federal judge’s decision from Friday night that imposed a temporary, nationwide halt to Trump’s order barring refugees and those from seven majority-Muslim nations from entering the country.

While his administration followed the orders of U.S. District Judge James L. Robart, the president blasted out his unhappiness with an extraordinarily personal criticism.

“The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned!” Trump said in a Saturday morning tweet. On a weekend trip to Florida, Trump went off to play golf, then returned to Twitter in the afternoon to say “many very bad and dangerous people may be pouring into our country” because of the judicial decision.

[Trump lashes out at ‘so-called judge’ who temporarily blocked entry ban]

1 of 25 Full Screen Autoplay Close Skip Ad × Travelers from seven majority-Muslim nations begin to arrive in the United States after executive order is suspended View Photos A federal judge in Seattle temporarily blocked enforcement of the travel ban. Government authorities immediately communicated with airlines to allow travel by those who had been barred, a U.S. official said. Caption After a federal judge in Seattle temporarily blocked enforcement of President Trump’s travel ban, government authorities immediately told airlines to allow travel by those who had been barred, a U.S. official said. Feb. 6, 2017 Muhamad Alhaj Moustafa, an internal medicine resident at MedStar Washington Hospital Center, embraces his wife, Nabila Alhaffar, after her arrival at Dulles International Airport. She had been temporarily blocked from returning to the United States after a trip to Qatar to see family. Melina Mara/The Washington Post Buy Photo Wait 1 second to continue.

Trump exaggerated the impact of Robart’s order, and Democrats charged that the president was trying to intimidate the independent judiciary. “The president’s hostility toward the rule of law is not just embarrassing, it is dangerous,” Sen. Patrick J. Leahy (D-Vt.) said in a statement.

The State Department said that those with valid visas could enter the country. DHS said it would “resume inspection of travelers in accordance with standard policy and procedure” that existed before Trump’s more restrictive executive order.

Advocates encouraged travelers from the affected countries who qualified for entry to get on planes as soon as possible because of the unpredictable legal terrain.

The developments continued what has been a chaotic rollout of Trump’s order, made on Jan. 27. More than a dozen legal challenges have been filed around the country, and only one judge so far has indicated that he was willing to let Trump’s order stand.

The decision of Robart, who was nominated by President George W. Bush and has been on the bench since 2004, was the most consequential because of its national implications.

It is somewhat unusual for a district judge to issue an order that affects the entire country, but Robart said it was necessary to follow Congress’s intention that “the immigration laws of the United States should be enforced vigorously and uniformly.”

He was quoting from a 2015 appeals court ruling that had blocked President Barack Obama’s executive action that would have made it easier for undocumented immigrants in this country to remain. It was never implemented because of legal challenges.

(Natalie Jennings,Bastien Inzaurralde,Alice Li/The Washington Post)

[Travelers from Iran board flights to the United States following stay, attorney says]

Justice Department lawyers were preparing to immediately ask the U.S. Court of Appeals for the 9th Circuit to dissolve Robart’s order, but had not filed anything as of Saturday evening. It will go to a panel of judges who consider such emergency requests, and that decision could be crucial.

While the losing side can then request intervention from the Supreme Court, it would take the votes of five justices to overturn the panel decision. The court has been shorthanded since the death of Justice Antonin Scalia nearly a year ago, and ideologically divided between four liberal and four conservative members.

The issue could reach the high court in days — or weeks.

Robart granted a request from attorneys for the states of Washington and Minnesota who had asked him to stop the government from acting on critical sections of Trump’s order. Justice and State department officials had revealed earlier Friday that about 60,000 — and possibly as many as 100,000 — visas already have been provisionally revoked as a result of Trump’s order.

A U.S. official who spoke on the condition of anonymity said that because of the court case, officials would examine the revoking of those visas so that people would be allowed to travel.

Robart’s order also enjoined the government from enforcing a section of the executive order that bars the entry of Syrian refugees.

The State Department said it is still working with other government agencies and the organizations that process refugees overseas to comply with the judge’s order. That means the action may not immediately help those seeking approval. Immigration lawyers said the State Department had informed them they should rebook trips for refugees whose plans were canceled after the executive order, which temporarily halted the refu­gee resettlement program.

On Tuesday, the Department of Homeland Security said it would allow 872 refugees into the country who were “already in transit” and would face “undue hardship” if denied admission.

“This ruling is another stinging rejection of President Trump’s unconstitutional Muslim ban,” said Omar Jadwat, director of the American Civil Liberties Union’s Immigrants’ Rights Project. “We will keep fighting to permanently dismantle this un-American executive order.”

Trump’s criticism of Robart reminded some of his remarks during the presidential campaign about the impartiality of a California federal judge who was hearing a class-action lawsuit involving Trump University.

Others counted that Obama had also been critical of judicial decisions he did not like — scolding the Supreme Court during a State of the Union address for its decision in Citizens United v. Federal Election Commission, and saying during the legal battle over the Affordable Care Act that it would be “unprecedented” to strike it down.

But Trump’s denunciation of Robart was more personal and direct. Vice President Pence defended the president’s words in an interview with George Stephanopoulos that will air on ABC’s “This Week.”

“I think the American people are very accustomed to this president speaking his mind and speaking very straight with them,” Pence said.

He agreed with Stephanopoulos that Robart had the authority for his ruling, and said “we’ll go through the process in the courts to get a stay of that order, so that, again, we can implement this action that is entirely focused on the safety and security of the American people.”

Other Republican leaders were mute, on both the decision and Trump’s language, and some in the GOP were unsettled by it.

“My advice to POTUS — attack the decision (it’s weak) not the judge,” Rep. Raúl R. Labrador (R-Idaho), who had backed Trump’s immigration order, wrote on Twitter. “Liberals are imploding, don’t make personal attacks the story.”

Democrats were not shy. “The president’s attack . . . shows a disdain for an independent judiciary that doesn’t always bend to his wishes and a continued lack of respect for the Constitution,” Senate Minority Leader Charles E. Schumer (D-N.Y.) said in a statement.

Leahy said Trump “seems intent on precipitating a constitutional crisis.”

The legal battles over Trump’s immigration order have become the mirror image of Obama’s attempt to shield illegal immigrants after Congress failed to pass comprehensive immigration reform.

Obama’s executive action would have deferred deportation for millions of undocumented immigrants who had been in the country since 2010, had not committed any serious crimes and had family ties to U.S. citizens or others lawfully in the country.

In that case, Republican state attorneys general led the fight against the order. A district judge in Texas agreed with them that it probably exceeded the president’s powers, and issued a nationwide injunction. Months later, the U.S. Court of Appeals for the 5th Circuit agreed; months after that, the Supreme Court took up the issue.

But the court deadlocked, meaning that the lower court ruling stood and the Obama administration suffered one of its most consequential legal defeats.

The players have changed sides now, with Democratic attorneys general and immigrant rights groups leading the fight against Trump and celebrating a district judge’s imposition of a nationwide order.

Anne Gearan, Abigail Hauslohner, Katie Zezima, Spencer S. Hsu and Karen DeYoung contributed to this report.