A federal judge on Saturday partially blocked US President's controversial immigration ban on people from seven Islamic states and ordered authorities not to deport refugees and other travellers with valid documents detained at US borders.
District Judge Ann Donnelly of the Brooklyn federal court stayed deportations that could have immediately sent people from seven predominantly Muslim countries back to where they came from.
The ruling comes as US airports braced for fresh protests against Donald Trump's temporary immigration ban.
An estimated 100 to 200 people had been detained at airports around the country when their planes landed on Friday and Saturday.
The federal court order applies to all travellers arriving at US airports across the country.
ACLU lawyer Lee Gelernt told the court that at least one person at JFK Airport was being put on a flight back to Syria at that moment, prompting an emergency hearing.
Trump's order caused a wave of anger and concern abroad, including among US allies, and activists rallied at major airports across the United States.
''Victory!!!!!!'' the American Civil Liberties Union (ACLU), which had sued the government, tweeted after Judge Donnelly in New York issued an emergency stay.
''Our courts today worked as they should as bulwarks against government abuse or unconstitutional policies and orders,'' the ACLU said.
But the ruling, which did not touch on the constitutionality of Trump's order, did not quiet protestors at New York's John F Kennedy Airport, where thousands had gathered.
Protests spread to other major airports in the country, including Washington, Chicago, Minneapolis, Denver, Los Angeles, San Francisco and Dallas.
Trump's executive order, signed on Friday, bars refugees arriving on short visas of at least 120 days and bars visas for travellers from seven Muslim majority countries for the next three months (See: Trump suspends all refugee admissions; to favour Christians).
While the exact number of affected is unclear, there is confusion among visitors and refugee population in America over the effect of Trump's travel ban.
Judge Donnelly has ordered the government to provide lists of all those detained at US airports since the measure came into effect.
Sending those travellers back to their home countries following Trump's order exposes them to ''substantial and irreparable injury,'' she wrote in her decision.
Another federal judge in Virginia also issued a temporary order restricting immigration authorities from deporting legal permanent residents detained at Dulles Airport just outside Washington for at least seven days.
The ACLU petition also sought the release of two Iraqi men on grounds of unlawful detention.
One of them - Hameed Khalid Darweesh, who had worked as interpreter and in other roles for the US in Iraq - was released on Saturday after being detained the day before.
The List Project, which helps Iraqis whose personal safety is threatened because they have worked for the US, was outraged over Darweesh's detention, warning it put American lives at risk too.
''I can't say this in blunt-enough terms: you can't screw over the people that risked their lives and bled for this country without consequences,'' wrote the project's founder and director Kirk Johnson.
Trump had vowed during his election campaign to subject travelers from Muslim-majority countries to ''extreme vetting'' – in what he said would make America safe from ''radical Islamic terrorists.''
Immigration activists said a ban on targeted countries, including Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen, were expected and that they were preparing for a fight back.
''We knew that was coming - we were prepared,'' said Camille Mackler, a lawyer who heads legal initiatives at the New York Immigration Coalition, one of the groups that quickly mounted the demonstration there.
''But we didn't know when, and we couldn't believe it would be immediate, that there'd be people in an airplane the moment the order was taking effect.''