In Northern Africa, cervical cancer is the second most common cancer among women. The diagnosis is usually made in advanced stages, and mortality is high, yet few studies have investigated the role of human papillomavirus (HPV) and other risk factors in the etiology of cervical cancer. A hospital-based case-control study was completed at the Institut National d'Oncologie (INO) in Rabat, Morocco. The study included 214 cases of invasive cervical cancer and 203 controls. A structured questionnaire was used to investigate known and suspected risk factors for cervical cancer. A GP 5+/6+ polymerase chain reaction system was used to detect the presence of HPV DNA and HPV type distribution. Probes for 30 HPV types were used in one research laboratory. HPV DNA was the central risk factor and accounted for the large majority of the cases. The adjusted odds ratio (ORa) for any HPV was 61.6 (95% CI, 29.2-130) and the corresponding HPV attributable fraction (AF) was 92%. Among cases of cervical cancer, HPV 16 was the most common type (67.7%) followed by HPV 18. The HPV type-specific prevalence was similar for squamous cell carcinomas and adenocarcinomas. In multivariate adjusted or HPV-stratified analyses, in addition to the strong effect of HPV, other risk factors identified were sexual intercourse with multiple partners before the age of 20 and low socio-economic status. Use of oral contraceptives for 5 or more years and high parity were also found to be related to cervical cancer. Screening was rare in this population but offered substantial protection against cervical cancer. In Morocco, cervical cancer is a late sequel of a viral infection with certain HPV types. Developing screening programs for preneoplastic cervical lesions is a public health priority. When available, HPV vaccination would offer a relevant alternative for preventing cervical cancer.