US District Judge Ann Donnelly in New York issued the emergency order after lawyers for the American Civil Liberties Union filed a court petition on behalf of people from seven predominantly Muslim nations who were detained at airports across the country as the ban took effect.
The judge's order affected only a portion of Trump's executive action. As the decision was announced, cheers broke out in crowds of demonstrators who had gathered at American airports and outside the Brooklyn courthouse where the ruling was issued.
The order barred US border agents from removing anyone who arrived in the US with a valid visa from Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen. It also covered anyone with an approved refugee application.
It was unclear how quickly the judge's order might affect people in detention, or whether it would allow others to resume flying.
"Realistically, we don't even know if people are going to be allowed onto the planes," said ACLU lawyer Lee Gelernt. "This order would protect people who they allow to come here and reach US soil."
Under Trump's order, it had appeared that an untold number of foreign-born US residents now traveling outside the US could be stuck overseas for at least 90 days even though they held permanent residency "green cards" or other visas. However, an official with the Department of Homeland Security said Saturday night that no green-card holders from the seven countries cited in Trump's order had been prevented from entering the US.
Some foreign nationals who were allowed to board flights before the order was signed Friday had been detained at US airports, told they were no longer welcome. The DHS official who briefed reporters by phone said 109 people who were in transit on airplanes had been denied entry and 173 had not been allowed to get on their planes overseas.
In her three-page order, Donnelly wrote that without the stay "there will be substantial and irreparable injury to refugees, visa-holders and other individuals from nations subject to the Jan. 27, 2017, executive order."
Trump billed his sweeping executive order as a necessary step to stop "radical Islamic terrorists" from coming to the US. It included a 90-day ban on travel to the US by citizens of Iraq, Syria, Iran, Sudan, Libya, Somalia or Yemen and a 120-day suspension of the US refugee program.
"It's working out very nicely," Trump said of the implementation of his order. "We're going to have a very, very strict ban and we're going to have extreme vetting, which we should have had in this country for many years."
The 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-Fort 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.