The objective of this study was to seek correlates of immune protection in HIV infection. We sought to elucidate the association between the presence of human leucocyte antigen (HLA) alleles, as well as killer immunoglobulin receptor (KIR) genotypes, and the susceptibility to HIV infection in a Spanish cohort of HIV-exposed seronegative (HESN) individuals. A total of 152 individuals were evaluated: 29 HESN individuals in stable heterosexual relationships with an HIV-infected partner admitting high-risk sexual intercourse for at least 12 months prior to inclusion in the study, 61 HIV-infected patients and 62 healthy controls. HLA class I and II alleles and KIR genotypes were assessed in genomic DNA from all individuals in the study by polymerase chain reaction-sequence-specific oligonucleotide (PCR-SSO) using bead array technology. HESN individuals showed a higher prevalence of HLA-A3 (62%) and HLA-B44 (83%) supertypes compared with HIV-infected individuals (42% and 66%, respectively). Regarding specific HLA alleles, HESN individuals had a higher prevalence of HLA-A*33:01, DRB1*04 and DQB1*03:02 alleles (14%, 34% and 31%, respectively) and a lower prevalence of the HLA-A*02:01 allele (27%) than HIV-infected patients (3%, 15%, 11% and 52%, respectively; P < 0.05). Interestingly, in a multivariate analysis, only the presence of DQB1*03:02 and the absence of A*02:01 alleles were independently associated with HESN status [odds ratio (OR) 3.4 (95% confidence interval (CI) 1.1-10.5) and 0.4 (95% CI: 0.1-0.9), respectively; P < 0.05]. No KIR genotype was associated with susceptibility to HIV infection. Our data showed that the presence of the HLA class II allele DQB1*03:02 was a correlate of immune protection against HIV infection, while the presence of the HLA class I allele A*02:01 was associated with being infected with HIV.