The American Civil Liberties Union (ACLU) filed a legal case early on Saturday in response to the order.
The judge's stay prevents those "caught up" in the aftermath from being deported, the ACLU said.
The group estimates that between 100 and 200 people were being detained at airports or in transit.
The court decision came as thousands protested at airports in several US states over Donald Trump's clamp down on immigration.