MINNEAPOLIS: A US federal judge temporarily blocked the administration of President Donald Trump Wednesday from detaining refugees in Minnesota awaiting permanent resident status and ordered the release of those in detention.

Trump has sent thousands of federal immigration agents to the Democratic state as part of a sweeping crackdown that has sparked outrage over two civilian deaths at the hands of officers.

Authorities launched a program this month to re-examine the legal status of the approximately 5,600 refugees in Minnesota who have not yet been given green cards.

In his order Wednesday, US District Judge John Tunheim said that the Trump administration could continue to enforce immigration laws and review refugees’ status, but that it must do so “without arresting and detaining refugees.”

“Refugees have a legal right to be in the United States, a right to work, a right to live peacefully — and importantly, a right not to be subjected to the terror of being arrested and detained without warrants or cause in their homes or on their way to religious services or to buy groceries,” Tunheim wrote.