(CNN) A federal judge on Friday ordered the release of four immigrants in ICE detention who are at high risk of serious illness in the event of a coronavirus outbreak and charged that the government had shown "deliberate indifference" to their medical needs.

In ruling for the immigrants, Judge Alison J. Nathan of the US District Court for the Southern District of New York said that even the government does not challenge that the petitioners have "serious, unmet medical needs," including one who has had a part of his lung removed, a condition that would make him especially vulnerable to the virus.

In her order, Nathan lambasted ICE, which she said has "not taken any action to address" how the virus will impact high risk immigrants in detention. The judge went as far as saying the Department of Homeland Security's own medical subject matter experts say that the agency has a "track record ... of failing to develop early detection and containment protocols for infectious disease outbreaks."

She said the inmates of the case had put forward evidence that ICE had "actual knowledge of their serious, unmet medical conditions," and that they should be released until a bond hearing.

"Petitioners have demonstrated a likelihood of success on their claim the Government's actions constitute deliberate indifference to Petitioners' medical needs, and thus violate the Fifth Amendment's substantive due process guarantee," Nathan ruled.

Read More