“The risk that Petitioners will face a severe, and quite possibly fatal, infection if they remain in immigration detention constitutes irreparable harm warranting a TRO,” wrote Torres, an appointee of President Barack Obama.

In her order issued Thursday evening, Torres also sharply criticized Immigration and Customs Enforcement officials for inadequate preparation for the outbreak and a lack of safeguards for the most vulnerable detainees.

“Respondents have exhibited, and continue to exhibit, deliberate indifference to Petitioners’ medical needs,” the judge wrote.

She noted that ICE-claimed detainees are being screened for the virus, isolated if suspected of infection and that cleaning of facilities has been stepped up.

However, Torres called those measures “patently insufficient to protect” the detainees in the case before her and she noted that lawyers representing ICE could not provide “any information about steps taken to protect high-risk detainees.”

There are about 40,000 immigrants in ICE custody across the country. Immigrant rights activists have called for the vast majority of them to be released to minimize their risk of contracting the virus.

While ICE has not formally announced any policy to consider release of immigration detainees due to dangers from the pandemic, Torres’ order says a lawyer from the U.S. Attorney’s Office in Manhattan indicated during a phone hearing earlier Thursday that five of the 10 prisoners covered by the petition were “expected” to be released Thursday regardless of the judge’s order.

It was not immediately clear why those five were due to be released or whether a broad review of immigration detainees for virus-related health risks is underway.

Spokespeople for ICE, the U.S. Attorney’s Office and the Justice Department did not immediately respond to requests for comment on the ruling Thursday night.

At least two other courts — the U.S. District Court in Boston and the San Francisco-based 9th Circuit — have ordered releases of individual immigration detainees in recent days due to virus concerns. But last week, a federal judge in Seattle turned down a request for the release of nine immigrants being held at a center in neighboring Tacoma.

Other cases pressing for release of detained immigrants are continuing to work their way through the courts.