Cervical cancer is caused by human papillomavirus (HPV) and is the most common cancer among Mexican women, but no population-based studies have reported the prevalence and determinants of HPV infection in Mexico. A population-based study was carried out between 1996 and 1999, based on an age-stratified random sample of 1,340 women with normal cytologic diagnoses from 33 municipalities of Morelos State, Mexico. The prevalence of cervical HPV DNA was determined by reverse line blot strip assay to detect 17 cancer-associated and 10 non-cancer-associated HPV types. Two peaks of HPV DNA prevalence were observed. A first peak of 16.7% was observed in the age group under 25 years. HPV DNA prevalence declined to 3.7% in the age group 35-44 years, then increased progressively to 23% among women 65 years and older. Cancer-associated HPV types were the most common in all age groups; non-cancer-associated HPV types were rare in the young and became more common linearly with age. Twenty-four types of HPV were detected; HPV 16, HPV 53, HPV 31 and HPV 18 were the most common, but none was present in more than 1.7% of subjects. The main determinant of infection with both cancer-associated and non-cancer-associated HPV types was the number of sexual partners in all age groups. Less-educated women were at an increased risk of infection with cancer-associated but not with non-cancer-associated HPV types; low socioeconomic status was associated with detection of non-cancer-associated HPV types. Among young women an increasing number of pregnancies was associated with lower HPV detection and among older women low socioeconomic status was related to increased HPV detection, particularly for the age group 35-54 years. Among women with cancer-associated HPV types, there was a higher intensity of polymerase chain reaction signal in younger than in older age groups (p < 0.001). We present additional evidence for the sexually transmitted nature of HPV infection, regardless of age group and HPV type. We confirm previous findings of a second peak of high-risk HPV infections in postmenopausal women, in this case with a clear predominance of cancer-associated HPV types. In populations with this pattern, which can be related to reactivation of latent HPV infections or high previous exposure in older women, screening with HPV testing can have a reduced specificity among older women if proper cut-off points for HPV positivity are not used. Longitudinal studies of immune responses to HPV infection in different age groups are warranted.