BACKGROUND: The association between human papillomavirus (HPV) infection and the risk of human immunodeficiency virus (HIV) seroconversion is unclear, and the genital cellular immunology has not been evaluated. METHODS: A case-control analysis nested within a male circumcision trial was conducted. Cases consisted of 44 male HIV seroconverters, and controls were 787 males who were persistently negative for HIV. The Roche HPV Linear Array Genotype Test detected high-risk HPV (HR-HPV) and low- risk HPV (LR-HPV) genotypes. Generalized estimating equations logistic regression was used to estimate adjusted odds ratios (aORs) of HIV seroconversion. In addition, densities of CD1a(+) dendritic cells, CD4(+) T cells, and CD8(+) T cells were measured using immunohistochemistry analysis in foreskins of 79 males randomly selected from participants in the circumcision trial. RESULTS: HR-HPV or LR-HPV acquisition was not significantly associated with HIV seroconversion, after adjustment for sexual behaviors. However, HR-HPV and LR-HPV clearance was significantly associated with HIV seroconversion (aOR, 3.25 [95% confidence interval CI, 1.11-9.55] and 3.18 [95% CI, 1.14-8.90], respectively). The odds of HIV seroconversion increased with increasing number of HPV genotypes cleared (P textless .001, by the test for trend). The median CD1a(+) dendritic cell density in the foreskin epidermis was significantly higher among males who cleared HPV (72.0 cells/mm(2) [interquartile range IQR, 29.4-138.3 cells/mm(2)]), compared with males who were persistently negative for HPV (32.1 cells/mm(2) [IQR, 3.1-96.2 cells/mm(2)]; P = .047), and increased progressively with the number of HPV genotypes cleared (P = .05). CONCLUSIONS: HPV clearance was associated with subsequent HIV seroconversion and also with increased epidermal dendritic cell density, which potentially mediates HIV seroconversion.