The protection conferred by natural immunity, vaccination, and both against symptomatic severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) infection with the BA.1 or BA.2 sublineages of the omicron (B.1.1.529) variant is unclear.We conducted a national, matched, test-negative, case-control study in Qatar from December 23, 2021, through February 21, 2022, to evaluate the effectiveness of vaccination with BNT162b2 (Pfizer-BioNTech) or mRNA-1273 (Moderna), natural immunity due to previous infection with variants other than omicron, and hybrid immunity (previous infection and vaccination) against symptomatic omicron infection and against severe, critical, or fatal coronavirus disease 2019 (Covid-19).The effectiveness of previous infection alone against symptomatic BA.2 infection was 46.1% (95% confidence interval [CI], 39.5 to 51.9). The effectiveness of vaccination with two doses of BNT162b2 and no previous infection was negligible (-1.1%; 95% CI, -7.1 to 4.6), but nearly all persons had received their second dose more than 6 months earlier. The effectiveness of three doses of BNT162b2 and no previous infection was 52.2% (95% CI, 48.1 to 55.9). The effectiveness of previous infection and two doses of BNT162b2 was 55.1% (95% CI, 50.9 to 58.9), and the effectiveness of previous infection and three doses of BNT162b2 was 77.3% (95% CI, 72.4 to 81.4). Previous infection alone, BNT162b2 vaccination alone, and hybrid immunity all showed strong effectiveness (>70%) against severe, critical, or fatal Covid-19 due to BA.2 infection. Similar results were observed in analyses of effectiveness against BA.1 infection and of vaccination with mRNA-1273.No discernable differences in protection against symptomatic BA.1 and BA.2 infection were seen with previous infection, vaccination, and hybrid immunity. Vaccination enhanced protection among persons who had had a previous infection. Hybrid immunity resulting from previous infection and recent booster vaccination conferred the strongest protection. (Funded by Weill Cornell Medicine-Qatar and others.).