It has been postulated that an infectious agent and/or specific sexual behaviour is involved in the aetiology of anal cancer, in analogy with the aetiology established for cancer of the cervix. A case-control study of 29,648 women with cancers registered in the Danish Cancer Registry during 1968-87 tested the hypothesis that anal cancer patients were more likely than patients with colon, stomach, or vulva cancer to have had a previous diagnosis of cervical intraepithelial neoplasia (CIN) or invasive cervical cancer. The odds ratio of CIN, adjusted for age and year of diagnosis, for anal vs colon cancer was 5.2 (95% confidence interval [CI] 3.3-8.3), that for anal vs stomach cancer 3.6 (2.1-6.0), and that for anal vs vulva cancer 1.6 (0.9-2.9). The median time from diagnosis of CIN to diagnosis of the registered cancer was 151 months for anal, 112 months for vulva, 114 months for colon, and 126 months for stomach cancer. The association with previous invasive cervical cancer was also investigated; no patient with cervical cancer in this second analysis had been included in the CIN analysis. The odds ratios were similar. In addition, anal cancer patients were significantly more likely to have had cervical cancer than were patients with vulva cancer (odds ratio 1.8 [1.0-3.9]). The strong association between anal cancer and CIN/invasive cervical cancer suggests that these cancers share common risk factors. The association is at least as strong as that between cervical and vulva cancer.