The paper discusses the preventive measures carried out in the penitentiary institutions of foreign countries, preventing the penetration and spread of coronavirus infection. Persons serving sentences in places of detention are at increased risk of infection in the event of an outbreak of the disease. Their situation requires separate consideration in planning and responding to crises. Measures to ensure social distancing are implemented through a special legal regime, the introduction of which limits the subjective rights of convicts. The introduced legal restrictions in some states provoked the emergence of criminal emergencies, which required the optimization of criminal and penal legal relations. Due to the emergency in the healthcare sector, it seems possible to use such institutions of criminal law as release from serving a sentence, deferment from serving a sentence, replacing the unserved part of a sentence with a milder type of punishment as an exceptional measure, and developing alternative ways to maintain socially useful ties. These methods include: increasing the duration of calls in correctional facilities, conducting visits through video conferencing, organizing a prompt exchange of information on the health status of relatives and convicts using a hotline, and using secure mobile devices.