BackgroundWe estimated the protection against the Omicron BA.2 variant associated with prior primary infection (PI) due to pre-Omicron or Omicron BA.1 virus, with and without mRNA vaccination.MethodsA test-negative case-control study was conducted among healthcare workers (HCWs) tested for SARS-CoV-2 in Quebec, Canada, between March 27 and June 4, 2022, when BA.2 predominated and was presumptively diagnosed. Logistic regression models compared the likelihood of BA.2 reinfection (second positive test ≥30 days after PI) among HCWs with history of PI and none to three doses of mRNA vaccine versus infection-naïve, unvaccinated HCWs.FindingsAmong 37,732 presumed BA.2 cases, 2,521 (6.7%) and 659 (1.7%) were reinfections following pre-Omicron or BA.1 PI, respectively. Among 73,507 controls, 7,360 (10.0%) and 12,315 (16.8%) had a pre-Omicron or BA.1 PI, respectively. Pre-Omicron PI was associated with 38% (95%CI:19-53) reduction in BA.2 infection risk, with higher BA.2 protection among those also vaccinated with one (56%), two (69%) or three (70%) vaccine doses. Omicron BA.1 PI was associated with greater protection against BA.2 (72%; 95%CI:65-78), higher among two-dose vaccinated at 96% (95%CI:95-96) but not improved with a third dose (96%; 95%CI:95-97). Hybrid Omicron BA.1 PI plus two or three dose vaccine-induced protection persisted for five months post-infection.InterpretationTwice-vaccinated individuals who experienced BA.1 infection were subsequently well-protected for a prolonged period against BA.2 reinfection and derived no meaningful added benefit against BA.2 from a third dose of mRNA vaccine.