A federal judge has ordered the release of 10 people held by U.S. Immigration and Customs Enforcement in New Jersey county jails where COVID-19 has been confirmed, citing chronic medical conditions of the detainees that make them particularly vulnerable to the disease.

Those ordered freed range in age from 31 to 56 years of age and have medical conditions including diabetes, heart disease and obesity, and some with past histories that include pneumonia and smoking. Five were being held at Bergen County Jail, three at Hudson County Jail and the other two at Essex County Jail.

U.S. District Judge Analisa Torres in the Southern District of New York granted a temporary restraining order against the inmates' continued detention while awaiting removal proceedings, writing: "Each of the jails where a Petitioner is being housed has reported confirmed cases of COVID-19. This includes two detainees and one correctional officer in the Hudson County Jail, one detainee at the Bergen County Jail, and a 'superior officer' at the Essex County Jail."

The judge ordered the detainees' immediate release, writing that the nature of detention facilities makes the spread of the virus more likely, as social distancing is more difficult to maintain.

Torres ordered the detainees released on their own recognizance, "subject to reasonable and appropriate conditions."

In her ruling, she also barred the director of ICE's New York Field Office, Thomas Decker, and Chad Wolf, the acting secretary of the Department of Homeland Security, from arresting the detainees again while their removal hearings are pending.

Wolf and Decker have until April 2 to explain why her order should not be converted to a preliminary injunction. The temporary restraining order expires on April 9.

The detainees were represented by Brooklyn Defender Services.

The ruling comes after news earlier this week that the first immigrant detainee had tested positive for coronavirus in the Bergen County Jail after a guard there had tested positive for the virus the previous week.

At the time, ICE said the man was "quarantined and receiving care" and those that had come in contact with him were being "cohorted and monitored."

On Thursday, hours before Torres' ruling, a second detainee, a 52-year-old Guatemalan man held at the Essex County Jail in Newark, also tested positive.

According to an emailed statement from Essex County that appeared on NorthJersey.com, the man "started to display symptoms consistent with coronavirus," was "administered a test, and that test came back positive."

"He currently remains under care at University Hospital in isolation," the statement said.

The case is 1:20-cv-2518.

Copyright 2020 NPR. To see more, visit https://www.npr.org.