Warning of an “impending viral explosion,” the ACLU of Pennsylvania pressed the state Supreme Court Monday to act immediately before county jails become epicenters for the coronavirus’ spread.

In a petition filed on behalf of five inmates across the commonwealth, the lawyers said it is only a matter of time before the virus overruns the tightly cramped confines of jails housing pretrial defendants, probation violators, and those incarcerated for minor offenses.

They urged the justices to take emergency steps to thin the populations and order each county to come up with a plan to release nonviolent offenders most at risk.

“Once COVID-19 enters a correction facility, it is virtually certain to spread like wildfire through the prison population, correctional staff, and into the nearby community,” wrote Witold Walczak, legal director for the ACLU of Pennsylvania.

“This is already happening in places like New York,” Walczak said, noting that at the New York City Rikers Island prison, the infection rate is more than seven times higher than that of the rest of New York City and 85 times greater than the country as a whole.

The suit came just hours after the Pennsylvania Department of Corrections put each of the state’s 24 prisons into lockdown after an inmate at SCI Phoenix in Montgomery County became the first in the state to test positive for the virus. Among the plaintiffs are two inmates at the Montgomery County Correctional Facility in Eagleville and a third at the George W. Hill Correctional Facility in Delaware County.

It also came as Philadelphia District Attorney Larry Krasner and Chief Defender Keir Bradford-Grey expressed frustration with what they characterized as the slow-moving efforts to release prisoners from the city’s jails — where the population on Sunday was about 4% lower than two weeks earlier — even as jurisdictions such as Los Angeles and New Jersey have released thousands of prisoners to curb the virus’ spread.

“Things are not moving faster in Philly because we haven’t been able to get judicial leadership to move as quickly as a pandemic requires,” Krasner said. “We did have a very positive conversation [last week], but we need to see numbers, not just talk.”

Bradford-Grey decried the current practice, calling it a “dangerously slow, case-by-case process of evaluating who should or should not be released.” She added: “We simply don’t have time for that.”

Philadelphia reported Friday that an employee and an inmate had contracted the virus in its jails, but declined to identify which facilities they were stationed in. And in Delaware County, three inmates and five staff members have fallen ill at the Hill Correctional Facility.

Advocates have noted that the conditions of most detention centers — where inmates are forced to sleep two or three to a cramped cell, to eat shoulder to shoulder in communal dining halls, and to share bathrooms with limited cleaning supplies — make it impossible to follow recommended social distancing guidelines.

“County jails were not built for the needs of this kind of pandemic,” said Joseph Amon, Drexel University’s director of global health. “Spread of COVID-19 within the jails will affect not only those who are being held there but also correctional officers who work there and the communities they go back to.”

So far, Pennsylvania’s counties have adopted a hodgepodge approach to addressing the looming situation. Allegheny County has released nearly 550 people from its jail for “fear that the jail would become a giant Petri dish for the virus.”

Though Philadelphia judges agreed last week on a process to begin reviewing motions to potentially release thousands of inmates, the population at the county’s jails stood at roughly 4,460 as of Sunday — a drop of only about 200 from the week before the coronavirus crisis began.

In its suit Monday, the ACLU recommended that Pennsylvania’s high court order all counties to come up with a plan to release nonviolent offenders, those being held for minor probation violations, and those unable to cover the costs of cash bail.

Krasner said “procedural obstacles” in the city’s court system — such as judges requiring lawyers to file individual motions for release on each case — had slowed that process in Philadelphia. On Monday, dozens of advocates staged a protest in Center City to draw awareness to the issue by honking their car horns and disrupting traffic around City Hall.

Gabriel Roberts, a courts spokesperson, said in a statement that city judges had “routinely and consistently asked for a comprehensive list of candidates for release from the DA’s Office — including the elderly, sick and those most susceptible to the virus — and it has yet to receive this information.” Judicial leadership, Roberts said, “remains available to continue discussions” about moving forward while balancing public health, public safety, and due process.