Last Updated: 10:16 p.m.

A FEDERAL JUDGE in New York issued a nationwide temporary injunction, halting the implementation of part of President Donald Trump’s executive order on immigration on Saturday night, blocking the deportation of travelers with valid visas detained at airports in the past 24 hours.

Judge Ann Donnelly, a United States District Court Judge in Brooklyn, issued the ruling at an emergency hearing on a lawsuit filed by the American Civil Liberties Union and other groups on Saturday, as Trump’s executive order temporarily banning citizens of seven nations with Muslim majorities from entering the U.S. took immediate effect.

The judge ruled that the government must immediately stop deporting travelers from those nations, including refugees who already went through a rigorous vetting process, and provide a complete list of all those detained, deputy director of the ACLU’s Immigrants’ Rights Project Lee Gelernt told reporters in Brooklyn.

“This ruling preserves the status quo and ensures that people who have been granted permission to be in this country are not illegally removed off U.S. soil,” Gelernt said.

Robert Howse, professor at New York University Law School, called the ruling “a pretty sweeping order,” but, he noted, it does not say that people in the U.S. have to be released from airport detention. “I think that’s a problem,” he said.

The ruling came after the detentions had sparked protests drawing thousands to airports across the country, including John F. Kennedy International Airport in New York, O’Hare International Airport in Chicago, Seattle–Tacoma International Airport, Los Angeles International Airport, San Francisco International Airport, Boston’s Logan Airport and Washington Dulles International Airport.

The pressure had already had limited effect, leading to the mid-afternoon release of one of the detainees, Hameed Khalid Darweesh, an Iraqi refugee who was forced to flee his country after working for the U.S. military there. He was released after more than 18 hours in detention, during which he was separated from his wife and children. His release was due, in part, to the intervention of two Democrats who represent New York in Congress, Rep. Nydia Velazquez and Rep. Jerry Nadler.

Outside the international arrival terminal, Darweesh gave an emotional statement to reporters and protesters.

A second Iraqi, Haider Sameer Abdulkhaleq Alshawi, who had also cleared an arduous vetting process to obtain refugee status and was en route to be reunited with his wife in Texas, remained in custody.

Organizers of the protest called for more demonstrators to join them outside Terminal 4 as they continue to press for the release of all of those detained inside.

Among the protesters at JFK was Rebecca Vilkomerson, the executive director of Jewish Voice for Peace, who pointed out on Friday night that Trump had signed the order banning refugees fleeing war on Holocaust Remembrance Day.

Trump’s order also bars legal permanent residents of the U.S. from returning home if they are now abroad, even though they already went through intense vetting procedures to get their green cards.

According to Trita Parsi, founder of the National Iranian American Council, border agents appeared unsure how to enforce the new regulations, detaining green-card holders in handcuffs and even questioning them on their views on Trump and social media posts.

Iranian-Americans with legal visas were detained at several airports on Saturday.