Get all the latest news on coronavirus and more delivered daily to your inbox. Sign up here.

A top U.N. group is calling for a moratorium on immigration detention as part of the response to the coronavirus pandemic -- while citing a controversial migration agreement the U.S. and a number of other countries refused to sign amid fears it would blur the distinction between legal and illegal immigration.

The statement, released by the U.N. Network on Migration, included guidelines for states and highlighted steps by some governments that both released detained migrants and gave them health care, housing and other taxpayer-funded services whether or not they were in the country legally.

CLICK HERE FOR COMPLETE CORONAVIRUS COVERAGE

Those recommendations include an end to immigration detention as a whole, as well as improving conditions in the meantime.

“The Network calls on States to introduce a moratorium on the use of immigration detention; to scale up and implement non-custodial community-based alternatives; to release all migrants in detention into alternatives, following strict safeguards and prioritizing children, families and other migrants in vulnerable situations; and to urgently improve overall conditions in places of immigration detention while we transition to alternatives,” the statement said.

The group claims that the coronavirus pandemic has “created momentum” for “alternatives” to detention that also provides services such as health care and housing to migrants.

It is the latest push by U.N. officials for relaxing, or abolishing entirely, forms of detention for those who cross borders illegally or seek asylum. A U.N. human rights expert last week called on the U.S. to release migrants being held in Immigration and Customs Enforcement (ICE) detention centers as part of an effort to counter the coronavirus pandemic, adding that detention should be used only as a last resort.

UN OFFICIAL CALLS FOR RELEASE OF DETAINED MIGRANTS IN US DUE TO CORONAVIRUS RISK 

“It is very difficult to keep the necessary physical distance in overcrowded detention facilities. Significantly reducing the number of detained migrants by releasing them into alternative settings can easily solve this,” U.N. special rapporteur on the human rights of migrants Felipe González Morales said.

The statement by the U.N. Network on Migration also “reminds States of their commitment in the Global Compact for Safe, Orderly and Regular Migration to prioritize alternatives to immigration detention, using detention as a measure of last resort only and working towards ending child immigration detention.”

The Global Compact for Safe, Orderly and Regular Migration was signed by a number of countries in Morocco at the end of 2018. However, the Trump administration led the push against the document, withdrawing itself from negotiations amid fears it could be a tool used to promote open borders under the disguise of international cooperation on the question of migration.

Hungary, Poland, Austria, Australia and Israel all later announced they would not sign the accord, citing concerns that it will limit the ability of countries to set and enforce their own immigration policies.

Former U.N. Ambassador Nikki Haley, who represented the U.S. at the U.N. when it withdrew from the compact, said that it was based on an international statement that “attempted to erase all distinctions between illegal and legal immigration.”

CLICK HERE TO GET THE FOX NEWS APP

“If we no longer acknowledge a difference between legal and illegal immigration -- and between people who need international protection and those who just want to escape poverty or crime -- we will have a system of completely open immigration,” she wrote in her 2019 book "With All Due Respect." “We will have effectively eliminated our borders. We can never do that.”

In the book, she said that while the document was nonbinding and largely symbolic, she first believed the U.S. could change the document's language and direction -- but as the debate went on, realized that wasn’t the case.