Mayor Bill de Blasio plans to release “vulnerable” inmates from city jails to prevent the spread of the coronavirus pandemic into local lockups, he said Wednesday.

“In the next 48 hours, we will identify any inmates who need to be brought out because of either their own health conditions — if they have any preexisting conditions, etc. — or because the charges were minor and we think it’s appropriate to bring them out in this context,” de Blasio said on WCBS radio Wednesday evening.

“That said, we still need our criminal justice system to function,” he added.

The announcement comes as correction officer and an inmate both tested positive of the deadly illness in the past day.

The Correction Officers Benevolent Association union has called for new masks to protect its members and for all new detainees to be housed in facilities other than Rikers Island amid the outbreak.

Some city officials, including Public Advocate Jumaane Williams, have pushed for the city to begin releasing prisoners who are over 50 years old and at a low-risk for re-offending.

The city Board of Correction, which oversees the jails, said in a statement Tuesday that the Big Apple needs to follow the lead of Los Angeles and Ohio authorities who have already started to release inmates to try to prevent the spread of the deadly contagion. That would include not just suspects awaiting trial but also inmates serving sentences of less than a year.

“The City must begin this process now,” the BOC said. “The City’s jails have particular challenges to preventing disease transmissions on a normal day and even more so during a public health crisis.”