Background Individuals with a prior Severe Acute Respiratory Syndrome Coronavirus 2 (SARS-CoV-2) infection have a moderate to high degree of protection against reinfection, though seemingly less so when the Omicron variant of SARS-CoV-2 started to circulate. The aim of this study was to evaluate the vaccine effectiveness (VE) against SARS-CoV-2 reinfection, Coronavirus Disease 2019 (COVID-19)-related hospitalization, and COVID-19-related death, in individuals with prior SARS-CoV-2 infection, and to assess the effect of time since vaccination during periods with different dominant SARS-CoV-2 variants. Methods and findings This study used a nationwide cohort design including all individuals with a confirmed SARS-CoV-2 infection, who were alive, and residing in Denmark between 1 January 2020 and 31 January 2022. Using Danish nationwide registries, we obtained information on SARS-CoV-2 infections, COVID-19 vaccination, age, sex, comorbidity, staying at hospital, and country of origin. The study population included were individuals with prior SARS-CoV-2 infection. Estimates of VE against SARS-CoV-2 reinfection with 95% confidence intervals (CIs) were calculated using a Poisson regression model and adjusted for age, sex, country of origin, comorbidity, staying at hospital, calendar time, and test incidence using a Cox regression model. The VE estimates were calculated separately for three periods with different dominant SARS-CoV-2 variants (Alpha (B.1.1.7), Delta (B.1.617.2), or Omicron (B.1.1.529)) and by time since vaccination using unvaccinated as the reference. In total, 148,527 person-years and 44,192 SARS-CoV-2 infections were included for the analysis regarding reinfections. The study population comprised of 209,814 individuals infected before or during the Alpha period, 292,978 before or during the Delta period, and 245,530 before or during the Omicron period. Of these, 40,281 individuals had completed their primary vaccination series during the Alpha period (19.2%), 190,026 during the Delta period (64.9%), and 158,563 during the Omicron period (64.6%). VE against reinfection following any COVID-19 vaccine type administered in Denmark, peaked at 71% (95% CI: -Inf to 100%) at 104 days or more after vaccination during the Alpha period, 94% (95% CI: 92% to 96%) 14 to 43 days after vaccination during the Delta period, and 60% (95% CI: 58% to 62%) 14 to 43 days after vaccination during the Omicron period. Waning immunity following vaccination was observed and was most pronounced during the Omicron period. Due to too few events, it was not possible to estimate VE for hospitalization and death. Study limitations include potentially undetected reinfections, differences in health-seeking behavior, or risk behavior between the compared groups. Conclusions This study shows that in previously infected individuals, completing a primary vaccination series was associated with a significant protection against SARS-CoV-2 reinfection compared with no vaccination. Even though vaccination seems to protect to a lesser degree against reinfection with the Omicron variant, these findings are of public health relevance as they show that previously infected individuals still benefit from COVID-19 vaccination in all three variant periods. Katrine Finderup Nielsen and colleagues investigate vaccine effectiveness against SARS-CoV-2 reinfection, COVID-19 related hospitalization and COVID-19 related death, in previously infected individuals in Denmark. Author summary Why was this study done? Vaccination is one of the best tools we have to curb the spread of Coronavirus Disease 2019 (COVID-19). This study was conducted to gain knowledge on whether previously infected individuals would still benefit from vaccination against COVID-19. What did the researchers do and find? Using nationwide, Danish register data for three separate periods of different Severe Acute Respiratory Syndrome Coronavirus 2 (SARS-CoV-2) variant dominance (Alpha, Delta, Omicron), more than 200,000 previously infected individuals were included in each period. For each period, the vaccine effectiveness (VE) against SARS-CoV-2 reinfection, COVID-19-related admission, and COVID-19-related death was investigated. This study showed that among previously infected individuals who have completed a primary vaccination series, vaccines are still effective against SARS-CoV-2 reinfection during periods with SARS-CoV-2 variants Alpha, Delta, and Omicron, ranging from 60% (95% confidence interval (CI): 58% to 62%) to 94% (95% CI: 92% to 96%) and lasting up to 9 months. What do these findings mean? These findings show that previously infected individuals still benefit from COVID-19 vaccination during all three variant periods. Insight into VE in individuals with natural immunity is important to help decision makers plan vaccination strategies. Unmeasured biases such as changes in risk behavior might influence the result, but the completeness of the national, Danish registries counteract this. Future studies with longer follow-up time are necessary to ascertain VE against severe outcomes in those with previous infection.