A federal judge in California on Monday ordered U.S. Immigration and Customs Enforcement to actively and rapidly review the cases of all detained immigrants at increased risk of severe illness or death if they contract the coronavirus and determine whether they should be released.

Judge Jesus Bernal of the U.S. District Court in Los Angeles said ICE needs to identify all immigrants in its custody who are either over the age of 55, pregnant or suffer from chronic medical conditions — like cardiovascular and respiratory diseases, cancer and HIV — in the next 10 days or within the first five days of detention for future detainees. He required the agency to make "timely custody determinations" for all detainees who fall into any of the high-risk categories he outlined.

Bernal underscored a sense of urgency in his order, admonishing ICE several times for what he described as inadequate and slow efforts to protect detainees.

Get Breaking News Delivered to Your Inbox

"At this stage of the pandemic, the threat is even clearer. The number of immigration detainees testing positive for COVID-19 continues to increase at an alarming rate," he wrote.

Coronavirus cases among the more than 31,000 immigrants held by ICE surged to 220 on Monday, with the agency reporting 96 new cases across the country, according to a notification to Congress obtained by CBS News.

Citing declarations by advocates who described conditions at different detention centers, Bernal concluded that ICE "likely exhibited callous indifference to the safety and well-being" of the immigrants he granted relief to.

"It is undisputed that COVID-19 finds its way into almost every workplace and communal setting, and the Defendants provide little explanation why immigration detention facilities will be different," Bernal continued, rebuking the government. "Defendants also do not dispute that 15% of individuals in the Subclasses who ultimately contract COVID-19 will die, or that those who survive are likely to suffer life-altering complications."

A protester wields a placard while riding in a convertible as activists take part in a car protest to call for the release of detained immigrants at the GEO Detention Center, because of the coronavirus, Friday, April 3, 2020, in Aurora, Colo. David Zalubowski / AP

The order also requires ICE to define and implement "minimum acceptable detention conditions" for all detainees with the risk factors defined by Bernal, including those whom the agency says it has to detain because of criminal convictions.

Because immigration detention is a civil matter and designed to ensure immigrants show up for court hearings, ICE has broad authority to release its detainees, including by placing them in programs in which officials monitor them through ankle bracelets or check-ins.

ICE did not respond to a request for comment. The Justice Department, which represents the government in federal litigation, also did immediately comment.

Earlier this month, ICE announced it would consider releasing detainees who were over the age of 60 or pregnant. The agency later instructed officials to also identify detainees with certain underlying medical conditions, like lung disease and severe asthma, for potential release, according to a directive to detention centers. The agency released nearly 700 detainees under these guidelines, according to ICE and congressional officials.

Monday's order appears to expand the categories for release by lowering the age of vulnerable detainees to 55 and defining all the medical conditions that could amount to risk factors. Bernal also noted his order will mandate that ICE field offices make individualized custody determinations for all at risk detainees, not just request that they do — which he said is the agency's current policy.

Advocates praised Bernal's order, which stemmed from a lawsuit filed by the Southern Poverty Law Center, the Civil Rights Education and Enforcement Center, Disability Rights Advocates and the law firms Orrick LLP and Willkie Farr and Gallagher LLP.

"ICE had time to act, and it failed. Fortunately, the court has ordered ICE to do what it should have done long ago: take appropriate measures to reduce risk to medically vulnerable individuals, or free them," Lisa Graybil, a legal director with the Southern Poverty Law Center, said in a statement.

AJ Sanchez-Martinez, a recently released immigrant named in the lawsuit, said he felt "happy" for others currently in ICE custody who could be freed under Monday's order.

"I used to tell people, 'what you see in here from ICE is the worst of America,'" Sanchez-Martinez said in a statement.