A federal judge this week refused to lift a temporary restraining order preventing the U.S. government from detaining refugees in Minnesota who were admitted legally but have not yet received their green cards.

U.S. District Judge John Tunheim issued the ruling Monday amid the continuing surge of federal immigration enforcement officers in the Twin Cities and greater Minnesota. 

The case was brought by refugees and human rights groups after the U.S. Department of Homeland Security began a new policy that allowed arrests and detention of refugees who have legally lived in the U.S. for more than a year. The judge said that the policy likely breaks the law and must remain paused while the case continues.

The temporary restraining order, first issued in late January, will stay in place until at least late February or until the court rules on a longer-term decision.

The judge said refugees could face serious harm without the order, including sudden arrests, being locked up and losing contact with family or lawyers. 

The U.S. government argued that the restraining order should be lifted, but the court disagreed. Tunheim’s decision keeps the temporary restraining order in place while the lawsuit moves forward.

The ruling applies only to refugees living in Minnesota.

The government must turn over documents about the policy and report on the release of detained refugees by 5 p.m. Wednesday.

More from CBS News