Introduction

Despite the large-scale vaccination programs against coronavirus SARS-CoV-2 deployed by governments and health authorities, COVID-19 is continuing to spread1. Seroprevalence surveys suggest that more than half of the global population had been infected with SARS-CoV-2 by 20222. Currently, close to three years into the pandemic, a large proportion of the world’s population is likely to have some form of immunity against SARS-CoV-2, either through infection (‘natural’), vaccination or both (‘hybrid’). As new variants of SARS-CoV-2 emerge, people are still at risk of new infections and severe COVID-19.

Systematic reviews conducted in the pre-Omicron era agree that vaccines are effective in preventing COVID-19 infection. Studies on the effectiveness of COVID-19 vaccines suggest that protection against SARS-CoV-2 decreases over time, waning considerably after six months.3,4 There is a large body of evidence documenting that naturally acquired immunity offers strong protection from reinfection5,6. Understandably, there is growing interest in comparing the impact of pre-existing SARS-CoV-2 infection-induced immunity7,8 against hybrid and vaccine-induced immunities.

In several studies, but not all, individuals who had recovered from COVID-19 and were vaccine recipients (BNT162b29,10,11,12, mRNA-127310,11, ChAdOx112) had a significantly lower risk of new SARS-CoV-2 infection than vaccine recipients with no COVID-19 history13. Previous SARS-CoV-2 infection and hybrid immunity both provide substantial and sustained protection against Omicron variant14. Further, a systematic review demonstrated that natural immunity in COVID-recovered individuals is, at least, equivalent to the protection afforded by complete vaccination of COVID-naïve populations15.

However, there are gaps in the literature on the magnitude and durability of protection conferred by different types of SARS-CoV-2 specific immunity when the predominant circulating SARS-CoV-2 strain changes.

We aimed to evaluate the real-world effectiveness of natural immunity in comparison to that of hybrid, vaccine-induced and no immunity against SARS-CoV-2 infection (breakthrough or reinfection) and COVID-19-related hospital admissions and evaluate epidemics stemming from Delta and Omicron SARS-CoV-2 variants in a population-based sample from Estonia.

Results

Study population and descriptive statistics

Our analysis was based on data from 246,113 matched individuals. Figure 1 shows the dynamic inclusion of individuals in the cohorts over time. The demographic and clinical characteristics of the cohorts are summarized in Table 1. The sex distribution was similar in Cohorts 1 and 2 (with approximately 9.4% more women than men); in Cohort 3, the difference was more pronounced (13.4% more women). The mean age at baseline was 46.2 years in Cohort 1 and 49.3 and 54.3 years in Cohorts 2 and 3, respectively.

Figure 1
figure 1

Study cohorts and inclusion to the cohorts.

Table 1 Characteristics of study cohorts, baseline dates and follow up times.

Risk of SARS-CoV-2 infection and COVID-19 hospitalization for individuals with natural immunity compared with individuals with no immunity (Cohort 1)

During the Delta period, the SARS-CoV-2 IR per 100 was 3.8 (95%CI 3.5–4.1) for those with natural immunity and over five times higher (IR 20.1 (19.5–20.8)) for those with no immunity. Table 2 shows the number of events (confirmed SARS-CoV-2 infections and hospitalizations) according to the Cohort 1 subcohorts (Table S1 provides a more detailed tabulation of the data by subcohort).

Table 2 Risk of SARS-CoV-2 infection and COVID-19 hospitalization for individuals with natural immunity compared with individuals with no immunity (Cohort 1).

Figure 2a reports the cumulative probability of infection for the Delta (Panel B) and Omicron (Panel C) periods for individuals with natural vs. no immunity.

Figure 2
figure 2

Cumulative risk of infection with SARS-CoV-2, according to cohort and period (overall, Delta, Omicron). (a) Cohort 1—natural and no-immunity (A overall follow-up period; B Delta period; C Omicron period). (b) Cohort 2—hybrid and natural immunity (A overall follow-up period; B Delta period; C Omicron period). (c) Cohort 3—natural and vaccine immunity (A overall follow-up period; B Delta period; C Omicron period).

We observed a reversal of the natural immunity effect. Throughout the Delta period, natural immunity provided a stable and strong protective effect (83%, aHR 0.17, 95% CI 0.15–0.18) compared to no immunity. However, during the Omicron period, individuals with natural immunity faced a higher risk of infection (aHR 1.24, 95% CI 1.18–1.32), indicating a shift in the dynamics (Table 2).

During both periods, natural immunity conferred substantial protection against COVID-19 hospitalization (Delta period aHR 0.05, 95%CI 0.03–0.11); Omicron period aHR 0.10, 95%CI 0.04–0.26) compared to those without SARS-CoV-2-specific immunity.

During both periods (Delta and Omicron), the risk for infection was higher for women (Delta aHR 1.21, 95%CI 1.14–1.29); Omicron aHR 1.1, 95%CI 1.12–1.25), those with more comorbidities, and those younger than 50 years. A longer time since the immunity-conferring event (SARS-CoV-2 infection) was associated with a minimal increase in risk (Delta aHR 1.03, 95%CI 1.01–1.04; Omicron aHR 1.02, 95%CI 1.00–1.03). The complete set of parameter estimates of the regression model is provided in Supplemental Table S4. Increasing age was a significant contributor to the risk for COVID-19 hospitalization, and females had approximately two times lower risk for severe COVID-19 (in comparison to men; Delta aHR 0.59, 95%CI 0.44–0.77, Omicron 0.43, 95%CI 0.26–0.72) (Table S5).

Risk of SARS-CoV-2 infection and COVID-19 hospitalization for individuals with hybrid immunity compared with individuals with natural immunity (Cohort 2)

During the Delta period, those with hybrid immunity had substantially lower rates of reinfection than those with natural immunity: IR 1.6, 95%CI 1.3–1.8 vs. 3.9, 95%CI 3.4–4.3, but during the Omicron period the difference in risks was diminished (IR 115.8, 95%CI 109.5–122.3 vs. 130.5, 95%CI 123.7–137.7) (see Fig. 2b and Table 2). During the Delta period, the hybrid immunity subcohort was associated with 39% (aHR 0.61, 95%CI 0.46–0.80) lower risk of infection than the natural immunity subcohort, but this benefit was not sustained during the Omicron period (aHR 1.05, 95%CI 0.93–1.19). Hospitalization due to COVID-19 was extremely rare among those with hybrid immunity (no cases during the Delta period and one case during the Omicron period).

There were differences in other factors associated with the risk of infection during the Delta and Omicron periods (Table S4). During both periods, individuals younger than 50 years had a higher risk for infection. In Delta period, a longer time since the immunity-conferring event was associated with some increase in risk (aHR 1.09, 95%CI 1.05–1.14), as was increasing number of comorbidities (1–2 vs. 0: aHR 1.54, 95%CI 1.16–2.06), 3 + vs 0: 1.38, 95%CI 0.85- 2.26). (See Supplemental Tables S2 and S4).

As within Cohort 1, we saw a reversal of the effects of age and sex for cases of COVID-19 infection: increasing age and male sex contributed to the higher risk for severe COVID-19 (Table S5).

Risk of SARS-CoV-2 infection and COVID-19 hospitalization for individuals with vaccine-induced immunity compared with individuals with natural immunity (Cohort 3)

During the Delta period, individuals with vaccine-induced immunity sustained a higher risk for infection than those with natural immunity (Delta period: IR 13.1, 95%CI 12.7–13.4 vs 3.3, 95%CI 3.2–3.5). For the Omicron period, the difference in risk diminished (IR 116.6, 95%CI 112.6–120.7 vs 115.0, 95%CI 112.2–117.9). The risks for COVID-19 hospitalization were very low in both subcohorts (see Fig. 2c and Table 2).

Compared to individuals with natural immunity, those with vaccine-induced immunity were at significantly higher risk of SARS-CoV-2 infection during the Delta period (aHR 4.90, 95%CI 4.48–5.36)), and at 13% higher risk during the Omicron period (aHR 1.13, 95%CI 1.06–1.21). Increased risk for COVID-19 hospitalisation among those with vaccine immunity during the Delta period (aHR 7.19, 95%CI 4.02–12.84) was not sustained over the Omicron period (aHR 2.0, 95%CI 0.64–6.25).

In both periods, the risk of infection was higher among those younger than 50 years, and a longer time since the immunity-conferring event (vaccination) was associated with a minimal increase in risk (Delta 1.13, 95%CI 1.12–1.15; Omicron aHR 1.01, 95%CI 1.00–1.02). (Table S4). The risk of COVID-19 hospitalization was lower among women and increased with age and with increasing numbers of comorbid conditions (Table S5).

Discussion

This population-based cohort study included data from the national electronic eHealth system to estimate the protection afforded by previous infection, hybrid immunity and vaccine-induced immunity and evaluate epidemics stemming from the Delta and Omicron variants. We observed significant differences in protection against SARS-CoV-2 infection and severe COVID-19 associated with the type of SARS-CoV-2-specific immunity and during the epidemic periods driven by different SARS-CoV-2 variants.

In agreement with other recent studies16,17,18, we showed that natural immunity conferred a clear protective effect against infection and hospitalization for more than one year during the Delta variant-dominated period when compared to no SARS-CoV-2-specific immunity. However, this protective effect against infection was reversed into an increased risk (25%) during the Omicron-dominated period. The decreased effectiveness of natural immunity in preventing reinfection by the new SARS-CoV-2 variant [Omicron] has been described before16. This might be explained by important changes in the virus (Omicron variant being more transmissible and less virulent19) and differences in population characteristics (age, contact patterns). During both periods, natural immunity proved to be highly effective in protecting against reinfections progressing to severe disease and was associated with a significantly lower risk of COVID hospitalization than no SARS-CoV-2-specific immunity.

The risk for infection among those with vaccine-induced immunity (in comparison with those with natural immunity) was more pronounced during the Delta variant-dominated period (risk increase of 195% vs. 13% during the Omicron period). The risk of severe COVID-19 among vaccinees in our study is comparable to that described from a UK cohort study (from a similar time period)20. We were able to extend the results of Gazit et al.21 by documenting a higher risk for infection and hospitalization caused not only by the Delta variant but also the Omicron SARS-CoV-2 variant among those with vaccine-induced immunity compared to those with natural immunity. Our study showed that natural immunity offers stronger and longer-lasting protection against infection, symptoms, and hospitalization compared to vaccine-induced immunity.

A higher infection protection effect of hybrid immunity in comparison to natural immunity has been described in pre-Omicron studies11,22 in comparison to natural immunity. During the Delta-dominated period, hybrid immunity offered greater protection against new and severe infections than natural immunity. This effect was not sustained during the Omicron period. Irrespective of the infection-causing variant, the protective effect of hybrid immunity in preventing infection progression to severe COVID-19 significantly exceeded that of natural immunity (although the absolute numbers of hospitalizations in the hybrid immunity subcohort were small).

Our analysis depicts the real-world effectiveness of different immunity-conferring events, and some aspects of our source data need to be discussed. First, our cohorts were accrued over different times (Cohort 1 was the earliest) during the study period. The cohort accrual follows the course of the epidemic and response to the epidemic—from emergence of people with no or post-infection natural immunity (our Cohort 1), progressing to cohorts of individuals with vaccine-induced and hybrid immunities. There are some age differences in cohorts, most likely reflecting the coverage and targeting of epidemic control measures (vaccination; social distancing). Cohort 3 (vaccine-induced vs. natural) members were the oldest (mean 55 years), and Cohort 1 (natural vs. no) members were the youngest (mean 47 years). We also observed some sociodemographic (education) and health/behaviour (vaccination coverage) differences between subcohorts. The majority (84%) of the hybrid immunity subcohort had only one vaccination—this is to be expected as per the vaccination recommendations. However, in the vaccinated subcohort, the majority (73%) had received two vaccine doses (Estonian population coverage with two doses was 62% as of January 2022)23.

There are important limitations to discuss in our work. First, there is misclassification. Our infected cohort and new infection cohort did not include those who might have had a SARS-CoV-2 infection but were not tested. The effect of this bias is conservative, leading to underestimation of the true effects. Importantly, the analysis of severe COVID-19 is unlikely to be affected by this bias, as people with symptoms indicative of severe acute respiratory disease would be hospitalized (and tested). Some patients might be admitted to the hospital with, but not because of, SARS-CoV-2 infection. We tried to minimize this by limiting hospitalized COVID-19 cases with ICD-10 diagnoses indicative of respiratory (infection) disease.

Categorization into epidemics driven by two different variants of SARS-CoV-2 was based on calendar time, not on actual test results. Based on the national SARS-CoV-2 genetic surveillance data, we identified periods when variants of concern represented the overwhelming majority of the isolates. Confounding is expected to arise due to the lack of randomization, given substantial differences in the clinical backgrounds and sociodemographic characteristics of the comparison groups. Even though in the analysis, we accounted for sex, education, comorbidities, SARS-CoV-2 testing probability and SARS-CoV-2 environmental exposure risk, residual confounding is possible. Our results might be affected by differences between the groups in terms of health behaviours (such as social distancing and mask wearing), a possible confounder that was not assessed. While these biases might influence our estimates, they seem unlikely to have caused the clear patterns observed in this study.

The strengths of this work should be noted. To the best of our knowledge, this is the first study to characterize the risk of infection by more than two different types of SARS-CoV-2-specific immunity in general population using real-life nationwide data. Pairwise comparisons of different immunity states have been reported before11,21,22,24. The strength of this work stems from nesting comparator states in the same source population and implementing standardized modelling for effect estimations. Data originating from electronic health and test records are most likely free from recall and social desirability biases. We would like to highlight that our use of a large, population-based sample size increases the generalizability to other countries with similar population structures (and public/health care provisions).

Conclusions

Our findings suggest that the risk of infection (and of developing severe disease) is affected not only by age and comorbidities but also by personal history of immunity-conferring events and by the viral variant responsible for the epidemic. Therefore, personalized risk-based vaccination strategies could be both effective and cost-effective.

Methods

Study setting

Vaccination in Estonia began in January 2021, with a cumulative vaccination uptake about 70% among adult population by June 2022. Within the time period of data underlying the present study, Estonia had three large pandemic waves: the first was from March to June 2020 (SARS-CoV-2 prevariant of concern era); the second was from November 2020 to May 2021 (first the Alpha variant, then the Delta variant); and the third was from December 2022 (Omicron variant)25. Our analysis used data derived from the nationwide and population-based universal tax-funded Estonian health care system.

Study design

We conducted a retrospective cohort study based on linking individual-level data on laboratory-confirmed COVID-19s, SARS-CoV-2 vaccination status, and health care utilization between 26 February 2020 and 23 February 2022 from the national e-health records26.

Data sources

The Health and Welfare Information Systems Centre (TEHIK)

Data on COVID-19 vaccination (dates), SARS-CoV-2 testing (dates) and laboratory confirmed (real-time polymerase chain reaction (PCR) or antigen testing) cases of SARS-CoV-2 infections (dates) were retrieved from TEHIK26. According to law, all health-care providers and laboratories in Estonia are obligated to report to TEHIK, with an expected coverage of 100%.

The Estonian Health Insurance Fund (HIF)

By the end of 2021, universal public health insurance covered 95.2% of the Estonian population (1,328,889 people)27. The HIF maintains a complete record of the health care services provided. Diagnoses are defined according to the International Classification of Diseases, tenth revision (ICD-10). The HIF database records sex, age, health care utilization information (dates of service, diagnoses, treatment type: in- or outpatient), and date of death.

The Population Register is a unified database of Estonian citizens and foreign nationals living in Estonia based on right of residence or residence permits. Population Register data were used to identify the study subjects’ education and ethnicity.

The databases are linked using a unique personal code given to all persons living in Estonia.

Participants

Our population was drawn from 329,496 individuals aged 18 years or older. Based on various histories of immunity-conferring events (i.e., infection and/or vaccination) from 26 February 2020 to 25 June 2021, we determined four exposure states:

  1. i.

    Individuals with no immunity (SARS-CoV-2 immune-naïve) were defined as those who were unvaccinated and did not have documented previous SARS-CoV-2 infections (n = 130 874);

  2. ii.

    Individuals with natural immunity (the recovered, unvaccinated cohort) were those with a documented previous infection but without previous vaccination (n = 47,491);

  3. iii.

    Individuals with vaccine-induced SARS-CoV-2 immunity (vaccinated-only cohort) were those without previously recorded infections who received a full vaccination course (BNT162b2; mRNA-1273; AZD1222; Ad26.COV2. S) (n = 127,460); and

  4. iv.

    Individuals with hybrid SARS-CoV-2 immunity (the recovered, vaccinated cohort) were defined as those with documented previous infections who received at least one vaccine dose (n = 23,671).

Construction of study cohorts

We constructed three mutually exclusive cohorts to assess the risk of SARS-CoV-2 (re)infection and COVID-19 hospital admission. Each cohort consisted of two subcohorts with different types of SARS-CoV-2 immunity (see Fig. 1).

Cohort 1 was formed to compare people with natural SARS-CoV-2 immunity to those without SARS-CoV-2 immunity. All individuals with natural immunity were randomly matched (1:1, without replacement) by birth year and sex to unvaccinated individuals with no immunity at baseline (for this cohort, the date of the positive SARS-CoV-2 test for individuals with natural immunity).

Cohort 2 was formed to compare hybrid SARS-CoV-2 immunity with natural immunity. Hybrid immunity was defined as having a documented previous infection and a single vaccine dose either before or after infection or having received two or more vaccine doses, with at least the second dose given after infection (One individual had received three vaccine doses).

All individuals with hybrid immunity were matched to those with natural immunity in a 1:1 ratio (with replacement) based on sex, birth year, and time. For this cohort, the baseline date was defined as (the date of the last immunity-conferring event for individuals with hybrid immunity. Matched subjects with natural immunity had to be alive, previous infected and unvaccinated on the baseline date. Matching was performed as an iterative process until all subjects with hybrid immunity had a suitable match of individuals with natural immunity only (n = 23,580 individuals). The follow-up started on the baseline date for both individuals in the matched pair.

Cohort 3 was formed to compare vaccine-induced immunity (vaccine only) to natural immunity. Those with vaccine-induced immunity had received at least one vaccine dose (30 individuals had received 3 or more vaccine doses). All individuals with vaccine-induced immunity were matched to those with natural immunity (n = 45,888 individuals) using the same principles as in the second cohort. The follow-up started at baseline (the date of the last immunity-conferring event of the individual with vaccine immunity) for both individuals in the matched pair.

The matching procedure resulted in 246,113 individuals being matched into the three cohorts.

Study outcomes

The primary outcome was laboratory confirmed SARS-CoV-2 infection occurring after the baseline date: (i) at any time for individuals with no immunity; (ii) after 60 days of recovery from a previous infection for individuals with natural immunity (i.e., reinfection)23; (iii) after being vaccinated for at least 14 days for individuals with vaccine-induced immunity (SARS-CoV-2 vaccination only) (i.e., breakthrough infection); and (iii) after being vaccinated for at least 14 days or after 60 days28 of recovery from a previous infection, whichever came later, for individuals with hybrid immunity.

The second outcome was hospitalization with COVID-19 as the reason for admission. This was defined as SARS-CoV-2-related hospitalization occurring from 3 days before to 14 days after a positive SARS-CoV-2 test and the presence of at least one of the following diagnoses (ICD-10) in relation to hospitalization: U07.1, U07.2, acute respiratory tract infections (J00–J06, J12, J15-J18, J20-J22, J46) or severe complications of lower respiratory tract infections (J80–84, J85–J86)29.

The follow-up duration was counted in days until the date of an outcome (the date of the positive SARS-CoV-2 test), vaccination (for individuals with natural or no immunity), death, or end of the study period (23 February 2022), whichever occurred first.

Variables accounted for in the risk model

The number of SARS-CoV-2 tests a person received throughout the pandemic was accounted for by counting the number of tests that an individual underwent from baseline to the end of the study. We defined three individualized testing intensities (< 1, 1–1.99, ≥ 2 per 100 person-days).

The comorbidity status was computed based on health data within 12 months before the baseline date using the Charlson comorbidity index (CCI)30, and study subjects were divided into three groups comprising those with no (CCI score of 0), one or two (CCI score of 1 or 2) or at least three (CCI score ≥ 3) comorbid conditions.

The follow-up period from baseline was split into four segments: up to 2, 2–4, 4–6, and 6–8 months. The number of and the time since the last immunity-conferring event (since SARS-CoV-2 infection or vaccination) within these groups were also quantified.

Data analysis

We analysed data from two time periods: from the start of follow-up until 19 December 2021, when the Delta variant was the predominant circulating SARS-CoV-2 strain (proportion of sequenced strains 93%); and 20 December 2021 to 23 February 2022 (end of follow-up), when the Omicron variants (BA1, BA2 and their sublineages) were the predominant strains (proportion of sequenced strains 88%)25.

Frequencies and proportions for categorical variables, means and standard deviations (SD) for age, and median and range for baseline date were used to characterize the study cohorts (Table 1). The follow-up duration is presented in months. The number of confirmed infections and the crude incidence rates (IRs) per 100 person-years were counted for each cohort (Tables S1S3). Cumulative Kaplan‒Meier curves are presented to describe SARS-CoV-2 infections in cohorts by different subcohorts (Fig. 2).

We performed Cox regression with the SARS-CoV-2 infection or COVID-19 hospitalization as the dependent variable and sex, age group (18–49, 50–64, 65–79, 80 + years), education (higher, < higher), nationality (Estonian, other), CCI score, time (in months) since the last conferring event and number of conferring events, and SARS-CoV-2 testing intensity as independent variables. Multivariable-adjusted hazard ratios (aHRs) and their 95% confidence intervals (CIs) are presented (Tables 2, 3, 4) (see Supplement for additional information on data analysis).

Table 3 Risk of SARS-CoV-2 infection and COVID-19 hospitalization for individuals with hybrid immunity compared with individuals with natural immunity (Cohort 2).
Table 4 Risk of SARS-CoV-2 infection and COVID-19 hospitalization for individuals with hybrid immunity compared with individuals with natural immunity (Cohort 3).

A p value of less than 0.05 was considered to indicate statistical significance in all analyses.

Data analysis was performed with the statistical software Stata 17.0.

The Research Ethics Committee of the University of Tartu approved our study and waived the requirement for informed consent. Whole research was performed in accordance with the relevant guidelines and regulations.