(Reuters) - The coronavirus is invading U.S. jails and prisons, prompting inmate releases, reduced bail requirements and other extraordinary measures as officials rush to avert a potentially disastrous spread of the virus among crowded inmate populations.

In New York City, where at least 29 inmates and 17 staff in the jail system have been infected by the coronavirus, Mayor Bill de Blasio said on Sunday 23 inmates would be released before day’s end and the city would decide within 24 hours whether to release up to 200 more.

He said inmates would be screened to identify those at risk from the virus, which has killed more than 14,000 people across the globe, including 415 in the United States.

Officials were still determining how many inmates ultimately should be let out of the city’s 11 jails, who will be eligible and how they will be supervised. “It’s very thorny,” de Blasio told a news conference. City residents need to “have relative comfort” that people who are released are unlikely to commit a “serious crime,” he added.

New York City’s Board of Corrections, an independent oversight body, has called on the mayor to release around 2,000 inmates who were severely sick, held on low-level offenses or jailed for parole violations.

“It’s the right number to make it work,” board member Dr. Robert Cohen told Reuters.

New York City’s jail system is among relatively few that have announced confirmed cases of the coronavirus among inmates or staff. But other jails nationwide are moving to reduce inmate populations before it arrives.

In Oklahoma City, the Oklahoma County Jail is working with judges and district attorneys to secure court orders for the release of inmates held on minor misdemeanors and considered minimal security risks.

Though the jail has no confirmed coronavirus cases among its 1,500 inmates, the goal is “to get out as many people as possible, keeping in mind the safety of the public,” said spokesman Mark Myers.

Jails typically hold people for relatively short periods as they await trial and have more flexibility to reduce populations than state or federal prisons, whose inmates have been convicted and sentenced.

While many state prisons have announced steps to limit the spread of the virus such as banning visitors, they generally require a court order to release inmates. Federal prisons face similar restrictions, although President Donald Trump said on Sunday that he would consider an executive order to release “totally nonviolent prisoners” from those facilities.

As the virus spreads, both jails and prisons share a fundamental problem: how to safeguard a captive population that includes large numbers of people with underlying medical problems.

When infections take hold, “it’s a problem for the public,” said Marc Stern, former medical director for the Washington State Department of Corrections and a faculty member at the University of Washington’s School of Public Health.

When inmates get sick, “it can spread outside facilities, through officers and staff, to families and the community,” said Stern, who is advising the National Sheriffs’ Association on how jails should manage the coronavirus outbreak.

And because inmates are more likely to have chronic medical conditions, such as diabetes and asthma, those who get sick “have a higher chance of needing hospitalization, which is going to use up hospital beds and other scarce resources for the community.”

California’s Department of Corrections and Rehabilitation reported on Saturday that at least three employees have COVID-19, the disease caused by the coronavirus, but no inmate infections have been confirmed.

Like several other state prison systems, the department is medically screening personnel who enter its facilities. It also is requiring 14-day quarantines for all inmates arriving from county jails, it said.

FLUID POPULATION

The United States has more people behind bars than any other nation, a total incarcerated population of nearly 2.3 million as of 2017, including nearly 1.5 million in state and federal prisons and another 745,000 in local jails, according to the U.S. Bureau of Justice Statistics.

Many experts see county and municipal jails as the more pressing concern because their populations are more fluid, so they pose more risk of transmitting the virus both in the jail and the community.

Reducing their populations not only limits the number of inmates and staff at risk of contracting the illness, it also enhances their ability to separate the remaining inmates, a crucial step for containing any outbreak, said Michele Deitch, a corrections expert at the University of Texas’ Lyndon B. Johnson School of Public Affairs.

In Utah, the Salt Lake County Sheriff’s Office has worked with local courts, prosecutors and public defenders to release 81 “non-violent prisoners” with a promise to appear in court at a later date, said Sergeant Carrie Fisher, the office’s spokeswoman.

Other jurisdictions are trying to reduce inmate populations by stemming the influx of new arrivals.

Last week, Los Angeles County Sheriff Alex Villanueva said the county had taken steps since late February to reduce the jail’s population by 617 inmates. This was done by releasing inmates with less than 30 days on their sentences and by changing bail requirement policies used to determine which arrestees would get a citation versus being booked into custody, he said.

The challenge is to move quickly, experts say, because most jails haven’t planned for such a fast-moving medical crisis.

“You could still get a lot of people out,” said Jacob Kang-Brown, a senior researcher at the Vera Institute of Justice, where he studies ways to reduce incarcerated populations.