NEW YORK (AP) — A federal judge in New York has issued an emergency order temporarily barring the U.S. from deporting people from nations subject to President Donald Trump’s travel ban.

U.S. District Judge Ann Donnelly issued the order Saturday evening 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.

READ MORE: Philadelphia Citywide Coalition Project Putting Boots On Ground To Help Battle Rising Gun Violence Among City's Young

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.

READ MORE: Embiid Scores 32, 76ers Hold Off Hornets Again 110-106

It also covered anyone with an approved refugee application.

It was unclear how quickly the order might affect people in detention

MORE NEWS: Flyers Shut Out By Devils For 10th Straight Loss

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)