This study investigated, through cohort analysis, whether HLA-DRB1 and -DQB1 variability is related to human papillomavirus (HPV) infection prevalence and persistence. HLA-DRB1 and -DQB1 genes were typed in 620 samples from the Ludwig-McGill cohort. HPV positivity was tested in specimens collected every 4 months during the first year of follow-up. Persistent and long-term infections were defined as at least 2 or 3 consecutive positive results for the same HPV type, respectively. The magnitudes of associations were estimated by unconditional logistic regression analysis adjusted for potential confounders. The DRB1*0301-DQB1*0201 haplotype was associated with a 2-fold reduction in risk for transient and persistent HPV infections. DRB1*1102-DQB1*0301 showed a lower-risk effect only for persistence. DRB1*1601-DQB1*0502 and DRB1*0807-DQB1*0402 were associated with a 7-fold and a 3-fold increase, respectively, in risk for persistence. The results suggest that HLA class II polymorphisms are involved in clearance and maintenance of HPV infection.