The State Department and Department of Homeland Security, honoring a federal court order, began dismantling President Trump’s travel ban Saturday even as the president derided the ruling as “ridiculous.”

U.S. District Senior Judge James Robart, from the U.S. District Court for the Western District of Washington state, issued the temporary restraining order Friday night that immediately lifted the ban.

President Trump blasted the ruling by the “so-called judge, “ tweeting that his opinion “essentially takes law-enforcement away from our country, is ridiculous and will be overturned!” Even before the president’s comments, the White Housesaid the federal government would challenge the decision.

Following the ruling, the State Department said it was restoring tens of thousands of canceled visas for foreigners while the Department of Homeland Security “suspended all actions” for enforcing the ban and instead began standard inspection of travelers.

“We encourage all U.S. visa holders who have been affected by the order to travel to the United States as soon as possible, while the stay is in place,” said Becca Heller, director of the International Refugee Assistance Project in New York.

Clare Kane, a law student intern at the Jerome N. Frank Legal Services Organization at the Yale Law School, noting that the Trump administration vowed to appeal the ruling, said “people should get on planes as soon as possible to reunite with their families, to access potentially life-saving healthcare, to flee life-threatening situations abroad, or to come home to their lives in the United States.”

With legal challenges pending, two prominent Middle Eastern air carriers, Qatar Airways and Etihad Airways, national carrier of the United Arab Emirates, said U.S.-bound travelers from those countries with valid visas would be allowed to board.  Air France, British Airways, Egyptair, Emirates Airlines, KLM, and Lufthansa also notified affected passengers about the change.

Government-backed Qatar Airways is one of a few Mideast airlines operating direct daily flights to multiple American cities. Its U.S. destinations from its Doha hub include New York, Chicago, Los Angeles, Miami and Washington.

Royal Jordanian is also resuming flights to the U.S. from the seven countries targeted by the Trump ban as long as people present valid visas or green cards.

In Kenya, about 140 Somali refugees whose resettlement in the United States this week was stopped by the travel ban have been sent back to their refugee camp instead, one of the refugees said Saturday.

It was not clear why they were returned a day after a U.S. court order blocked Trump’s ban on travelers and immigrants from seven predominantly Muslim countries, including Somalia. Officials with the International Organization for Migration, which runs the transit center in Nairobi where the refugees had been waiting for their flights to the U.S., could not be reached for comment.

“How would you feel? One day you are telling friends bye, wishing them well, and the next you are back where you started,” 28-year-old Nadir Hassan told The Associated Press by phone from the camp. “My home for 27 years was a refugee camp. I was hoping to start a new life in the U.S., get an education, a job, a life. We feel bad.”

He had been on a waiting list to leave for about a decade, he said.

In issuing his decision, Robart sided with Washington Attorney General Bob Ferguson, who filed a suit to block key provisions of the president’s executive order, which sought to block people from seven majority-Muslim countries, or any refugees, from entering the country.

Justice Department attorneys defending the executive order highlight the president’s broad legal authority to restrict entry of immigrants when deemed in the national interest of the United States, citing congressional authority in the Immigration and Nationality Act. In this case, the federal attorneys argue the purpose of the executive order is “intended to protect the American people from terrorist attacks by foreign nationals.”

In Washington state, Gov. Jay Inslee, a Democrat, hailed Ferguson and applauded the decision.

“We should feel heartened by today’s victory and more resolute than ever that we are fighting on the right side of history,” the governor said in a statement. “Thank you to (Attorney General Bob Ferguson) and his team for making the case that no person – not even the president – is above the law.”

Amnesty International also applauded the development.

“This decision is a short-term relief for thousands of people whose lives have been upended, but Congress must step in and block this unlawful ban for good,” organization spokesman Eric Ferrero said in a statement. “Trump’s Muslim ban is inhumane, unlawful, and discriminatory, which is why the courts and the public want it to be stopped.”

Ferguson said his team had been working around-the-clock for the last week on reversing the executive order.

“It’s obviously an historic decision and an important one for the rule of law and for the people of the state of Washington and the people of our country,” Ferguson said. “I have said from the beginning: it is not the loudest voice that prevails in the courtroom, it is the Constitution, and that’s what we heard from Judge Robart today.”

A lawyer with the national office of the American Civil Liberties Union said the decision was significant.

“The decision in Washington reaffirms that the courts will stand up to the president,” said Lee Gelernt, the lawyer who successfully argued for the stay against Trump’s ban in federal court in Brooklyn, N.Y., last week.

“The courts have and will continue to recognize that this executive order favors Christians and disfavors Muslims and that is antithetical to American values and flatly inconsistent with the United States Constitution.”

Word of the decision came shortly after revelations about an earlier decision by U.S. District Judge Nathaniel Gorton out of Boston, who refused to extend a temporary order that allowed some people affected by Trump’s ban to enter the country. Gorton ruled that the ACLU failed to demonstrate a need for an ongoing restraining order, the Boston Globe reported.

Protests over the travel ban erupted in several cities in the U.S. and abroad, including New York and Los Angeles. Several thousand people also demonstrated outside the U.S. embassy in London and near the Eiffel Tower in Paris ban.