Polymorphisms in the Toll-like receptor 9 1635 locus have been associated with HIV-1 acquisition and progression. Cytomegalovirus (CMV) and Epstein–Barr virus (EBV) acquisition were compared between Kenyan HIV-exposed infants by 1635 genotype. Having one or more copies of the 1635A allele was associated with increased CMV acquisition in HIV-infected infants (42 vs. 11%, P = 0.03) and increased risk of EBV acquisition in HIV-exposed uninfected infants (hazard ratio = 4.2, P = 0.02) compared with 1635GG. In addition, 1635A was associated with 0.4 log10 copies/ml lower median EBV levels in HIV-infected infants (P = 0.03). These data suggest a potentially important role for this locus in primary herpesvirus infection.