A federal judge in Washington state blocked President Trump's travel ban targeting seven Muslim countries Friday night, a decision Trump attacked as illegitimate the next morning.

“The work of the Judiciary, and this court, is limited to ensuring that the actions taken by the other two branches comport with our country’s laws, and more importantly, our Constitution,” wrote federal judge James Robart, who was nominated to the bench by President George W. Bush. “The court concludes that the circumstances brought before it today are such that it must intervene to fulfill its constitutional role in our tripart government.”

The State Department and Department of Homeland Security said Saturday morning they would roll back their enforcement of the ban in compliance with the court’s temporary restraining order.

At the same time, Trump attacked the restraining order and attacked the legitimacy of the judge who handed it down. “The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned!” he tweeted.

“This assault on the legitimacy of a federal judge is an abuse of the president's constitutional authority,” Bruce Ackerman, a Yale University law professor, told me. “It is the task of the Justice Department to provide a reasoned case for overruling Judge Robart's decision. The president is assaulting the foundations of the separation of powers in condemning the judge for his decision in a tweet.”

Democrats quickly condemned Trump’s remarks. “The President’s hostility toward the rule of law is not just embarrassing, it is dangerous,” Vermont Senator Patrick Leahy said in a statement. “He seems intent on precipitating a constitutional crisis.”

The initial effect of the executive order was seen in U.S. airports, where dozens of travelers were detained as hundreds of lawyers and thousands of protesters nationwide demanded their release. But the order’s full extent covered far more people than its visible impact had suggested. Around 60,000 people from the seven Muslim-majority countries—Iraq, Iran, Libya, Somalia, Sudan, Syria, and Yemen—had their visas “provisionally revoked” under the order, State Department officials said Friday.

The number of revocations still represented tens of thousands of lives thrown into limbo by the order’s sudden release. Under it, visa holders from the seven affected countries were denied entry to the United States. Only a small handful of visa categories were initially excluded by its parameters, including diplomatic visas, NATO visas, and visas used for travel to United Nations headquarters in New York City. The order also suspended the U.S. Refugee Application Program for 120 days and permanently barred the admission of Syrian refugees.

White House Press Secretary Sean Spicer told reporters Monday that 109 people had been detained at U.S. airports last weekend, but did not offer figures on how many visa holders would be affected. In comparison, about 11 million immigrant and non-immigrant visas were issued by the State Department in fiscal year 2015.

The State Department’s number falls short of a figure offered during a hearing in a Virginia federal court Friday on the ban’s status. Justice Department lawyer Erez Reuveni told federal judge Leonie Brinkema that 100,000 people had been affected by the provisional revocation, a number that reportedly provoked audible gasps in the courtroom when it was announced. It wasn’t clear on Friday night why the Justice Department’s figures differed from those provided by the State Department, which oversees the visa application process.

A chaotic rollout last Friday also led to confusion about whether the order applied to green card holders, who enjoy more legal protections as lawful permanent residents than most visa holders. After a series of confusing statements from White House officials, Homeland Security Secretary John Kelly clarified Sunday night that they would be allowed into the country under a waiver. The Department of Homeland Security also said in a statement Friday that Special Immigrant Visa holders, a term used for Afghan and Iraqi translators who worked with the U.S. military during the wars, would be allowed to board U.S.-bound flights.

Many of the order’s provisions have been temporarily blocked by federal judges pending further hearings on its legality and constitutionality. Judge Brinkema extended her order on Friday after the hearing and ordered federal officials to provide the state of Virginia, which filed a motion to intervene in the case, with a list of all Virginia residents who had been affected by the order. In Massachusetts, federal judge Nathaniel Gorton lifted a temporary restraining order on Friday that he had issued last weekend enjoining the Trump administration from enforcing key parts of the order. In his opinion, Gorton wrote that the plaintiffs, who are two Iranian-born green card holders, were unlikely to succeed on the merits of their claims.

State Department officials said Friday that the ban had not affected the legal status of visa holders already in the United States from those countries. The provisional revocation also meant the visas could be restored at a later date, as the State Department did Saturday, without requiring the holder to apply for a new one.