NEW YORK - The city will shut down classrooms or even entire schools for fourteen days if students or staff test positive for the coronavirus in the upcoming school year, Mayor de Blasio and Schools Chancellor Richard Carranza announced Thursday.

The procedures are part of the city’s testing and tracing protocols for schools, which are set to partially re-open for what’s called “blended learning” -- students attend in-person some days and learning remotely on others -- this September.

The exact action the city will take in response to a lab-confirmed positive case depends on the situation -- but the first step in all cases will be that the health department and NYC Test + Trace Corps will launch an investigation into the risk of exposure for the school community.

If there is one confirmed case, the city will close the student or staff member’s classroom during the investigation and transition to remote learning -- and the classroom will remain closed for 14 days, with students and staff in close contact with the positive case self-quarantining for that time. If there are two or more cases within the same classroom, the city will follow the same procedure.

But if there are two or more confirmed cases of coronavirus among children in different classrooms, the city will close the entire building during the investigation, with all children shifting to remote learning. After the investigation, the classrooms of each confirmed case will remain closed and quarantined, and additional school members will be quarantined based on where the exposure was in the school.

If there are two cases in the school that an investigation determines are linked together by circumstances outside of school -- such as two siblings or children who carpool together testing positive -- the school will also be closed during the investigation, but will re-open after, with just the relevant classrooms remaining closed.

If there are two or more cases not linked to one another but investigators can determine the exposure happened outside of the school, the school will close during the investigation but re-open after, with relevant classrooms staying closed.

And finally, if there are two cases in different classrooms and the city’s can’t determine any link other than attending the same school -- the entire school will close during the investigation and remain closed for 14 days after.