An emergency stay has been granted to temporarily allow people who landed in the US with a valid visa to remain.
Chaos broke out at airports across the country after US President Donald Trump's executive order on immigration caused confusion and panic.
The restrictions saw the suspension of the US refugee programme and blocked entry from visitors from seven countries with Muslim majorities.
A number of the travellers blocked were green card holders in the US - legal permanent residents of the country, but with passports from Iran, Iraq, Libya, Somalia, Sudan, Syria or Yemen.
Between 100 and 200 people have been detained at US airports or are in transit and will be affected by the stay, according to the American Civil Liberties Union.
Earlier in the day Mr Trump said the controversial travel ban was "working out very nicely".
"You see it at the airports, you see it all over, it's working out very nicely," he said.
Protesters gathered at airports around the country as the news broke about legal residents being turned away.
US District Court's Judge Ann Donnelly said the government "hasn't had a full chance to think about this".
The government was unable to prove those being sent back to nations, including Syria, wouldn't suffer "irreparable harm" as a result.
Mr Trump denied the order was targeting Muslims despite the seven blocked countries being Muslim-majority nations.
Newshub.