This study evaluated prospectively the use of an endoscope in examination of the anal canal for the detection of premalignant lesions. All patients underwent endoscopy and anal epithelial biopsy; the biopsy samples were examined histologically and human papillomavirus (HPV) DNA hybridisation was done. No evidence of anal intraepithelial neoplasia (AIN) was found in 20 control patients with anal fissure or fistula. Of 82 patients with anal HPV infection, 23 had evidence of AIN. The prevalence of AIN was significantly higher among homosexual than among heterosexual men (17 of 28 vs 1 of 26) with anal HPV infection. Of 28 women with anal HPV infection, 10 had cervical intraepithelial neoplasia (CIN); 5 of the 10 also had AIN, whereas no woman had AIN in the absence of CIN. The study shows that AIN occurs and can be diagnosed endoscopically in a manner similar to CIN. Further detailed prospective studies on the natural history of AIN and of groups at risk are required.