Forty anal paraffin-embedded tissue specimens from 24 subjects were studied for the presence of human papillomavirus (HPV) types 6, 11, 16, 18, 31, and 33, herpes simplex virus (HSV), Epstein-Barr virus, and cytomegalovirus DNA by using the polymerase chain reaction. These tissues ranged from histologically normal to invasive squamous cell carcinoma. HPV DNA was detected in the invasive anal cancer tissues of 11 of 13 subjects. HPV types were segregated by histopathological severity, with HPV 16 associated exclusively with high grade anal intraepithelial neoplasia and invasive cancer. HPV types 6 and 11 were associated with condyloma and low grade anal intraepithelial neoplasia. HPV DNA in situ hybridization studies confirmed the presence of HPV DNA in the invasive cancer tissues of 6 of 12 subjects. HPV DNA in these tissues was highly focal and primarily associated with invasive cell nests that demonstrated the greatest degree of squamous differentiation. HSV DNA was detected only in association with advanced disease, being found in the cancer tissues of 5 of 13 subjects, and in 3 of 4 subjects with high grade anal intraepithelial neoplasia, but was not detected by in situ hybridization. Epstein-Barr virus and cytomegalovirus DNA were not detected in the 40 tissue specimens. We conclude that HPV infection may play an important role in the pathogenesis of anal cancer. The association between HSV infection and high grade anal disease suggests that HSV infection may also play a role in disease progression.