PurposePrisons can be epicentres of infectious diseases. However, empirical evidence on the impact of the severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) pandemic in prison is still scarce. This study aims to estimate the seroprevalence rates of anti-SARS-CoV-2 in the largest and most crowded Swiss prison and compare them with the seroprevalence rate in the general population.Design/methodology/approachA cross-sectional study was conducted in June 2020, one month after the first wave of SARS-CoV-2 in Switzerland. Groups included: people living in detention (PLDs) detained before the beginning of the pandemic (n = 116), PLDs incarcerated after the beginning of the pandemic (n = 61), prison staff and prison healthcare workers (n = 227) and a sample from the general population in the same time period (n = 3,404). The authors assessed anti-SARS-CoV-2 IgG antibodies.FindingsPLDs who were incarcerated before the beginning of the pandemic had a significantly lower seroprevalence rate [0.9%, confidence interval (CI)95%: 0.1%–5.9%] compared to the general population (6.3%, CI 95%: 5.6–7.3%) (p = 0.041). The differences between PLDs who were incarcerated before and other groups were marginally significant (PLDs incarcerated after the beginning of the pandemic: 6.6%, CI 95%: 2.5%–16.6%, p = 0.063; prison staff CI 95%: 4.8%, 2.7%–8.6%, p = 0.093). The seroprevalence of prison staff was only slightly and non-significantly lower than that of the general population.Originality/valueDuring the first wave, despite overcrowding and interaction with the community, the prison was not a hotspot of SARS-CoV-2 infection. Preventive measures probably helped avoiding clusters of infection. The authors suggest that preventive measures that impact social welfare could be relaxed when overall circulation in the community is low to prevent the negative impact of isolation.