Maryland’s highest court has ordered judges throughout the state to try to reduce the number of young people held in juvenile detention facilities to minimize their exposure to the deadly novel coronavirus.

The order from Chief Judge Mary Ellen Barbera directs local courts to find alternatives to locking up juvenile offenders and to review detention orders every two weeks until the end of the covid-19 crisis.

Local judges are encouraged to identify detained juveniles for potential release “in order to protect the health of at-risk juveniles during the COVID-19 pandemic crisis” and to “limit detention or commitment, unless necessary to protect the safety of that juvenile respondent or the safety of others.”

The order, issued late Monday, followed an emergency request from the public defender’s office to limit the number of young people held in state-run facilities because of concerns about the rapid spread of the virus. The Court of Appeals denied the request Friday and instead issued statewide guidance for reviewing juvenile cases.

“While some judges and prosecutors have already been working with us to get kids home to their loved ones during this terrifying time, several have not,” Maryland Public Defender Paul DeWolfe said in a statement Tuesday.

“The chief judge’s order makes clear that a consistent statewide effort is urgently needed.”

Separately, Barbera issued a similar order related to incarcerated adults Tuesday, directing judges to identify at-risk prison inmates for potential release. She directed judges to speed up the handling of hearings to consider releasing people detained pending trial, particularly for nonviolent crimes and alleged technical and minor violations of probation.

There are more than 500 young people under the supervision of the state, including in juvenile jails, prisons and other facilities, according to data from state officials. The state Department of Juvenile Services reported that 58 percent of children in juvenile jails and 74 percent in youth prisons or other placements are there for nonviolent felonies, misdemeanors or violations of probation.

Eric Solomon, a spokesman for Maryland’s Department of Juvenile Services, said the government is already considering which juveniles in custody to recommend for community supervision based on their medical history, family support and public safety.

“The courts make the decision on whether to release a youth, and DJS strives to ensure the court has a comprehensive overview of a youth’s circumstances, risk level, and the department’s continued ability to supervise youth successfully in the community during this crisis,” Solomon said in a statement Tuesday.

To reduce the risk of young offenders being exposed to the coronavirus while in custody, the department is screening all staff for symptoms, has suspended in-person family visits and has created medical isolation units.

In the days since the public defenders’ request was filed in court in early April, 11 juvenile offenders and staff at facilities around the state have tested positive for the coronavirus, which causes the disease covid-19, according to Jenny Egan, chief attorney of the public defender’s Baltimore City Juvenile Division.

“Absent the release of a large number of young people from state run facilities, experts agree the coronavirus will spread in juvenile jails and youth prisons at an exponential rate,” Egan said in a statement urging local courts and state officials to quickly reduce the number of young people in custody in Maryland.

The effort to thin the number of young offenders in state-run facilities mirrors calls throughout the country to release adult inmates, primarily those who are elderly, nonviolent or close to release.

Authorities have freed thousands of parole violators or nonviolent offenders nearing release in places such as New York and California. The American Civil Liberties Union of Maryland filed an emergency petition last week asking the state’s highest court to help speed the release of hundreds or thousands of inmates.