A federal judge on Monday ordered the Prince George’s County jail to identify all inmates who are medically vulnerable to covid-19 after a court-ordered inspection of the facility found that a limited number of tests have been conducted for the novel coronavirus.

U.S. District Judge Paula Xinis asked whether inmates with preexisting medical conditions could be housed in a separate unit. An attorney for the jail said that had been considered but that administrators worry that having them together could have “devastating effects” if the virus were to spread through their own, separate unit.

The hearing was the latest development in a lawsuit filed on April 21 by attorneys on behalf of Prince George’s inmates alleging they have been left woefully unprotected from an outbreak of the virus. Xinis did not order immediate remedies at the jail, and encouraged the attorneys to continue trying to work through possible solutions with their counterparts representing jail officials.

As of Monday, Prince George’s jail officials reported 18 inmates having tested positive for the virus — the same total going back to April 23. That lined up with findings from the jail inspector, who said the outbreak peaked in the jail around April 5 to 10. The jail has conducted 24 total coronavirus tests of inmates, a jail spokesman said Monday.

“All 18 have completed quarantine and returned to general population,” the spokesman, Andrew Cephas, wrote by email.

He added that 32 civilian and sworn staff members have tested positive for the virus and that 18 of them have returned to duty.

During Monday’s hearing, Xinis pushed an attorney for the jail on why more tests weren’t being conducted in the jail. The lawyer, Shelley Lynn Johnson, said the jail was having trouble getting test kits — saying that as of Monday it had only 24 on hand.

Xinis asked Johnson to document “how many trees have been shaken to get more” test kits.

Also at issue Monday were inmates’ claims, asserted in filings over the weekend, that the jail is housing inmates that local courts have indicated should be released. Xinis ordered the attorneys to provide a list of those inmates to county jail officials.

The lawsuit filed in Maryland by Civil Rights Corps in April urged the release of inmates, asserting the county has allowed unsanitary conditions in the jail and has not followed recommendations from the Centers for Disease Control and Prevention to stop the spread of the coronavirus.

Carlos Franco-Paredes, a clinician from the University of Colorado School of Medicine, examined the jail last week as part of the lawsuit. Xinis had given Franco-Paredes wide authority to examine and photograph the jail and speak to inmates and staff members, according to an earlier hearing.

Franco-Paredes said during Monday’s hearing that during his inspection last week, jail officials appeared to be following jail operating recommendations by the CDC.

“I think for the most part they were in compliance with CDC guidelines at the time of the inspection,” he said.

Franco-Paredes indicated there were inmates beyond those who were tested who had covid-19 symptoms at the time of the peak outbreak last month. “The outbreak was really much larger at some point,” he said. “Recently there’s not been any more individuals with any symptoms” of covid-19.

Separately on Tuesday, D.C. jail system inspectors reported improved conditions after a federal judge on April 19 ordered an overhaul of health and safety measures. Inspectors also reviewed conditions at the jail in the District after the American Civil Liberties Union filed a lawsuit complaining of conditions at the facility.

Inspectors report pandemic-prompted lockdowns have fueled disturbances as inmates have been allowed to leave their cells for just one hour every one to three days, including between the hours of midnight and 3 a.m.

The total clampdowns are required because of severe understaffing and the need to enforce social distancing measures to fight the spread of the virus. As a result, the jail has slashed the number of inmates released at any one time to shower, clean their cells, make legal or family calls, or recreate.

At the same time, inmates are facing barriers to timely medical attention, legal calls and adequate cleaning supplies, inspectors said.

“It’s a tense environment . . . and a very difficult and stressful situation,” for guards and prisoners, court-ordered inspector Grace Lopes said at a teleconference hearing in Washington. She said fights between inmates and confrontations with guards and medical personnel have grown.

“Inmates feel they’re being unduly punished because they are locked down for a significant part of the day. . . . Staff are tired,” Lopes said.

Overall, as of Sunday, the D.C. jail system reported a spike of 11 additional inmates testing positive, bringing the total to 177 after a decrease in new infections since mid-April. Nearly 3 out of 4 inmates — 873 out of about 1,200 — are under quarantine or in medical isolation.

“I’m happy to hear the numbers have gone down . . . and also that the [D.C.] Department of Corrections has continued to cooperate [with inspectors]. Obviously that makes it better for all of us to be able to get a handle on all of this,” U.S. District Judge Colleen Kollar-Kotelly of the District said.