Waning of natural infection protection and vaccine protection highlight the need to evaluate changes in population immunity over time. Population immunity of previous SARS-CoV-2 infection or of COVID-19 vaccination are defined, respectively, as the overall protection against reinfection or against breakthrough infection at a given point in time in a given population. We estimated these population immunities in Qatar's population between July 1, 2020 and November 30, 2022, to discern generic features of the epidemiology of SARS-CoV-2. Effectiveness of previous infection, mRNA primary-series vaccination, and mRNA booster (third-dose) vaccination in preventing infection were estimated, month by month, using matched, test-negative, case–control studies. Previous-infection effectiveness against reinfection was strong before emergence of Omicron, but declined with time after a wave and rebounded after a new wave. Effectiveness dropped after Omicron emergence from 88.3% (95% CI: 84.8–91.0%) in November 2021 to 51.0% (95% CI: 48.3–53.6%) in December 2021. Primary-series effectiveness against infection was 84.0% (95% CI: 83.0–85.0%) in April 2021, soon after introduction of vaccination, before waning gradually to 52.7% (95% CI: 46.5–58.2%) by November 2021. Effectiveness declined linearly by ∼1 percentage point every 5 days. After Omicron emergence, effectiveness dropped from 52.7% (95% CI: 46.5–58.2%) in November 2021 to negligible levels in December 2021. Booster effectiveness dropped after Omicron emergence from 83.0% (95% CI: 65.6–91.6%) in November 2021 to 32.9% (95% CI: 26.7–38.5%) in December 2021, and continued to decline thereafter. Effectiveness of previous infection and vaccination against severe, critical, or fatal COVID-19 were generally >80% throughout the study duration. High population immunity against infection may not be sustained beyond a year, but population immunity against severe COVID-19 is durable with slow waning even after Omicron emergence. The Biomedical Research Program and the Biostatistics, Epidemiology, and the Biomathematics Research Core, both at 10.13039/100019460 Weill Cornell Medicine-Qatar , 10.13039/501100004397 Ministry of Public Health , 10.13039/100007833 Hamad Medical Corporation , 10.13039/100019475 Sidra Medicine , Qatar Genome Programme, Qatar University Biomedical Research Center, and Qatar University Internal Grant ID QUCG-CAS-23/24-114.