Mycobacterium tuberculosis (M. tuberculosis) infections cause 9.0 million new tuberculosis (TB) cases and 1.5 million deaths annually1. To search for sequence variants that confer risk of TB we tested 28.3 million variants identified through whole-genome sequencing of 2,636 Icelanders for association with TB (8,162 cases and 277,643 controls), pulmonary TB (PTB), and M. tuberculosis infection. We found association of three sequence variants in the HLA class II region: rs557011[T] (MAF=40.2%) with M. tuberculosis infection (OR =1.14, P=3.1×10-13) and PTB (OR=1.25, P=5.8×10-12) and rs9271378[G] (MAF=32.5%) with PTB (OR=0.78, P=2.5×10-12), both located between HLA-DQA1 and HLA-DRB1. Finally, a missense variant p.Ala210Thr in HLA-DQA1, (MAF=19.1%, rs9272785) shows association with M. tuberculosis infection (P=9.3×10-9, OR=1.14). The association of these variants with PTB was replicated in large samples of European ancestry from Russia and Croatia (P< 5.9×10-4). These findings demonstrate that the HLA class II region contributes to the complex genetic risk of tuberculosis, possibly through reduced presentation of protective M. tuberculosis antigens to T cells.