The turnaround by the State Department and Department of Homeland Security came after a federal judge in Seattle Friday issued a nationwide ruling that temporarily suspended Trump’s executive order blocking travel for visa holders from those countries and interrupting the refugee program. The Trump administration Saturday evening filed notice appealing the decision to the US Court of Appeals for the Ninth Circuit.

In a stunning reversal following a week of chaos, two US government agencies Saturday temporarily halted enforcement of President Trump’s travel ban against people from seven majority Muslim countries and refugees worldwide even as his administration vowed to fight for the restrictions in court.


Trump’s Jan. 27 order barred visa holders from Iran, Iraq, Libya, Somalia, Sudan, Syria, and Yemen from the United States for 90 days, halted the entire refugee program for 120 days, and closed the door to Syrian refugees indefinitely. The restrictions don’t apply to green-card holders, officials have said.

Trump used Twitter Saturday to blast the decision by US District Judge James Robart. The president and his aides have argued that the executive order will make the country safer. Demonstrators across the country have protested against Trump’s directive.

“The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned!” Trump wrote in a tweet posted at 8:12 a.m. “What is our country coming to when a judge can halt a Homeland Security travel ban and anyone, even with bad intentions, can come into US?”

He called the ruling “a terrible decision.”

The State Department said it would reverse visa cancellations for those affected by the ban and is working to comply with Robart’s order on refugees. Some are expected to arrive Monday, an official said.

Homeland Security spokeswoman Gillian Christensen said the agency would follow Robart’s ruling and “resume inspection of travelers in accordance with standard policy and procedure.”


She called Trump’s order “lawful and appropriate.”

“The order is intended to protect the homeland and the American people, and the president has no higher duty and responsibility than to do so,” Christensen said.

Robart’s decision not only temporarily halts all the major elements of Trump’s order but also temporarily puts the brakes on provisions capping the number of refugees allowed into the country this fiscal year at 50,000 and giving preference to religious minorities seeking refugee status.

In his ruling, Robart wrote that Trump’s directive “adversely affects’’ residents of Washington and Minnesota, who brought the court challenge.

“This (order) is granted on a nationwide basis’’ the ruling said, and prohibited enforcement of the president’s executive order “at all United States borders and ports of entry pending further orders from this court.’’

The decision is expected to pave the way for Iraqi doctor Deelan Dakhil to travel to Washington, D.C., Monday with her sister, Vian, who is receiving a human rights award from the Lantos Foundation, a New Hampshire organization.

Vian Dakhil, a member of Iraq’s Parliament, is being recognized for her efforts to combat terrorism, a crusade which made her into one of ISIS’s “Most Wanted” women.

Secretary of State Rex Tillerson granted her special permission to travel, said Katrina Lantos Swett, the foundation’s president.

Deelan Dakhil said her sister is eager to visit the United States to discuss the Yazidi people, a religious sect in Iraq that faced mass genocide and religious persecution by the Islamic State.


“We have always thought that the best place that we can deliver our voice is the US because it is the country of freedom and democracy,” Deelan Dakhil said in an e-mail.

Attorneys in Boston who have fought Trump’s executive order welcomed the government announcements, which means visa holders from the affected countries can travel to the United States freely for now.

“It’s truly a great country where the courts fulfilled their ultimate purpose as envisioned by the founding fathers to prevent one branch of the government from acting unconstitutionally or unethically,” said attorney Susan Church, who leads the New England chapter of the American Immigration Lawyers Association.

Carol Rose, executive director of the American Civil Liberties Union of Massachusetts, said the announcements are good news for the families involved.

“This isn’t just about law,” she said. “This is about actual human lives and the ability for people to be reunited with their families.”

At Logan International Airport Saturday afternoon, expectant families waited with signs, flowers, and tissues for loved ones to arrive on a Lufthansa flight carrying about 40 Iranians, many of whom had been turned back at least once over the past week.

Mahdi Hashemian and his wife, Homa Koohi, waited with their 4-year-old daughter, Zeynab, for Homa’s mother, Akram Khajehali, who lives Iran.

When the family first came to Boston about two years ago so Hashemian could enter a PhD program at MIT, Koohi said she loved how free Americans were to speak and express themselves, how they embraced people for who they were, and how they advocated for human rights.


Now, she said, it felt like the country was moving backward.

“It doesn’t feel like before,” she said.

Jeffrey Thielman, president and chief executive of the International Institute of New England, said his staff is ready to welcome refugees to the United States. The organization helps resettle refugees in Boston, Lowell, and Manchester, N.H.

“Our team will be ready to receive refugees as early as Monday,” he said.

Earlier Saturday amid the confusion of conflicting information, Thielman said his staff tried to calm families worried about their plights. He shared their concern but also expressed a measure of hope in the system. “We are still a nation of laws,” he said, “even though right now it doesn’t seem like it.”

Despite the travel ban, the Trump administration allowed 872 refugees into the country through Friday. Another 21 Afghans who worked as US military translators and were granted special interest visas are expected to arrive this month, Thielman said.

Saturday’s announcements capped a hectic week in which lawyers nationwide tried to block Trump’s order and travelers from the affected nations scrambled get into the country.

The first federal court orders temporarily blocking the ban were issued in New York and Boston, though some attorneys said it was unclear whether the Trump administration heeded the earlier rulings.

Like the Seattle ruling, a decision issued in Boston Jan. 29 was supposed to apply nationwide, but some travelers were still blocked from boarding planes, lawyers said.


Boston immigration attorney Kerry Doyle urged people with valid visas who may be affected by Trump’s order to travel to the US quickly given the government’s appeal plans.

“I would tell the person overseas to get on a plane and come home,” she said.

Federal officials disclosed Friday that nearly 60,000 visas were revoked as a result of the ban, which Massachusetts officials said thrust hundreds, if not thousands, of businesses and colleges into turmoil. Professors, scientists, and doctors who had left the United States were shocked to discover that they could not return home.

Trump supporters, however, said the president’s order is fulfilling his promise to voters.

“A temporary pause from seven countries is not a ‘Muslim ban,’ ” said Dean Cavaretta, former state director for Trump’s primary campaign in Massachusetts. “I’d like to see our Congress, instead of running to a microphone, work to solve the larger problem.”

Hours before Robart’s decision Friday, a federal judge in Boston sided with the Trump administration in a case challenging the ban.

US District Judge Nathaniel M. Gorton in Massachusetts refused to extend a temporary stay on the president’s ban, saying Trump would likely succeed in the case on the grounds that he has broad authority over federal immigration laws.

Saturday evening, President Trump tweeted his exasperation that Gorton’s ruling hadn’t gotten more notice: “Why aren’t the lawyers looking at and using the Federal Court decision in Boston, which is at conflict with ridiculous lift ban decision,” Trump asked.

Lawyers who brought the case said Saturday that they are reviewing their options.

The case initially had been filed on behalf of two University of Massachusetts Dartmouth professors, both Muslim green card holders from Iran, who were detained and interrogated for about three hours Jan. 28 at Logan.

Legal analysts said the split between the decisions in Seattle and Boston could fast-track the appeals process and possibly open the door for the US Supreme Court to get involved.

“It’s conceivable that the courts will look at the issue and make different rationales, and reach different conclusions, and ultimately these things will be litigated, and if the courts differ it will go all the way up and go before the US Supreme Court,” said Howard Cooper, a Boston attorney who has followed the cases.

What remains unclear is what avenue the Justice Department will take in appealing Robart’s ruling. The appeal notice filed Saturday evening didn’t include the government’s legal arguments it wants the higher court to consider.

When he issued his order Friday, Robart said he would hold a follow-up hearing to decide whether to extend it. That hearing hasn’t been scheduled.

Milton J. Valencia of the Globe staff and Globe correspondent Nicole Fleming contributed. Associated Press material was used in this report. Laura Crimaldi can be reached at laura.crimaldi@globe.com. Maria Sacchetti can be reached at msacchetti@globe.com. Evan Allen can be reached at evan.allen@globe.com.