To investigate the prevalence of and the risk factors for cervical infection with human papillomavirus (HPV) in an inner-city area of Ibadan, Nigeria, we interviewed and obtained a sample of cervical cells from 932 sexually active women aged 15 years or older. A total of 32 different HPV types were identified with an HPV prevalence of 26.3% overall and 24.8% among women without cervical lesions; or age-standardised to the world standard population of 28.3 and 27.3%, respectively. High-risk HPV types predominated, most notably HPV 16, 31, 35 and 58. In all, 33.5% of infections involved more than one HPV type. Unlike most populations studied so far, HPV prevalence was high not only among young women, but also in middle and old age. Single women (odds ratio, OR=2.1; 95% confidence interval, CI=1.1-3.9) and illiterate women (OR=1.7; 95%CI=1.1-2.5) showed increased HPV positivity. Associations were also found with anti-Herpes simplex-2 antibodies (OR=1.6; 95% CI: 1.1-2.1) and with the husband's extramarital relationships (OR=1.6: 95% CI: 1.0-2.6). High prevalence of HPV in all age groups may be a distinctive feature of populations where HPV transmission continues into middle age and cervical cancer incidence is very high.