NEW YORK -- A federal judge issued an emergency order Saturday night temporarily barring the U.S. from deporting people from nations subject to President Donald Trump’s travel ban, saying travelers who had been detained had a strong argument that their legal rights had been violated.

Cheers broke out in a crowd of demonstrators outside a Brooklyn courthouse as the decision, effective nationwide, was announced. The order barred U.S. border agents from removing anyone who arrived in the U.S. with a valid visa from Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen. It also covered anyone with an approved refugee application.

The Department of Homeland Security has not seen the judge’s order issuing an injunction and therefore could not say how it will change how they implement the president’s orders tomorrow, CBS News justice reporter Paula Reid reported.

It was unclear how quickly the order might affect people in detention, or whether it would allow others to resume flying.

Get Breaking News Delivered to Your Inbox

“Realistically, we don’t even know if people are going to be allowed onto the planes,” said American Civil Liberties Union (ACLU) lawyer Lee Gelernt. “This order would protect people who they allow to come here and reach U.S. soil.”

The ACLU and other legal organizations had filed a lawsuit on behalf of individuals subject to the ban that resulted from an executive order Mr. Trump signed on Friday. The U.S. government detained those who were the lead plaintiffs in the case and threatened them with deportation, the ACLU said in a statement, noting that the plaintiffs had valid visas to enter the U.S.

Gelernt, who is deputy director of the ACLU’s Immigrants’ Rights Project, said the Saturday 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.”

Judge Ann Donnelly made the ruling a day after Mr. Trump signed the executive order that changed American immigration and refugee policies. The order banned people from seven countries with Muslim majorities -- Syria, Iraq, Libya, Iran, Sudan, Somalia and Yemen -- from entering the U.S. It also placed a temporary hold on any refugees entering the U.S. for 120 days, until officials decide on a new screening process, and placed an indefinite hold on the entry of Syrian refugees fleeing war in their country.

Senior administration officials told CBS News that green card holders from the seven listed countries would be evaluated on a case-by-case basis to determine if they can enter the U.S.

A senior Department of Homeland Security official said that as a result of operational actions in the first 23 hours after the executive order, the department denied entry to 109 travelers who were covered by the order and in transit to the U.S. when it was put into place. The official said 173 travelers had entry suspended before they boarded from their last point of departure.

Friday’s order sparked protests at several of the nation’s international airports, including New York’s Kennedy and Chicago’s O’Hare and facilities in Minneapolis and Dallas-Forth Worth. In San Francisco, hundreds blocked the street outside the arrival area of the international terminal. Several dozen demonstrated at the airport in Portland, Oregon, briefly disrupting light rail service while hoisting signs that read “Portland Coffee Is From Yemen” and chanting anti-Trump slogans.

Outside New York’s Kennedy airport, protesters held signs reading: “Let Them In,” Disobey,” and “Refugees Welcome.”

U.S. lawmakers and officials around the globe also criticized the move.

Iranian President Hassan Rouhani criticized Mr. Trump Saturday after the executive orders started taking effect, saying that it was “not the time to build walls between nations.”

Javad Zarif, Iran’s foreign minister, had harsher words for what he termed on Twitter a “#Muslimban.” He charged that Mr. Trump’s actions would be considered by history as a “great gift to extremists and their supporters” and said it showed the “baselessness of U.S. claims of friendship with the Iranian people.”

Sen. Ben Sasse, a Nebraska Republican on the Senate Armed Services Committee, said while Trump is right to focus on border security, the order is “too broad.”

“If we send a signal to the Middle East that the U.S. sees all Muslims as jihadis, the terrorist recruiters win by telling kids that America is banning Muslims and that this is America versus one religion,” Sasse said. “Our generational fight against jihadism requires wisdom.”

Canadian Prime Minister Justin Trudeau posted his message on Twitter.

“To those fleeing persecution, terror & war, Canadians will welcome you, regardless of your faith,” he tweeted.

Two of the first people blocked from entering the United States were Iraqis with links to the U.S. military. Hameed Khalid Darweesh and Haider Sameer Abdulkhaleq Alshawi were detained by immigration officials after landing at New York’s Kennedy airport Friday night. Both had been released by Saturday night after their lawyers intervened.

Trump’s order drew support from some Republican lawmakers who have urged more security measures for the refugee vetting program, particularly for those from Syria.

“We are a compassionate nation and a country of immigrants. But as we know, terrorists are dead set on using our immigration and refugee programs as a Trojan Horse to attack us,” House Homeland Security Committee Chairman Michael McCaul said in a statement Friday. “With the stroke of a pen, he is doing more to shut down terrorist pathways into this country than the last administration did in eight years.”