Recent studies suggest human-immunodeficiency virus (HIV) may be the cause of HIV-associated idiopathic esophageal ulcer (IEU). However, other causes of esophageal disease in HIV-infected patients have not been evaluated for appropriate comparison. Over a 14-month period 13 patients with IEU as determined by clinical, endoscopic, and pathologic criteria were identified. During the same period nine HIV-infected patients with cytomegalovirus (CMV) esophagitis and one HIV-infected patient each with herpes simplex virus esophagitis and gastroesophageal reflux disease (GERD) were also identified. Polymerase chain reaction (PCR) and in situ DNA hybridization (ISH) were performed on paraffin-embedded tissue of endoscopic biopsies of ulcer tissue using standard techniques. Eleven of 13 IEU patients (85%) as compared to seven of nine patients (78%) with CMV had HIV detected by PCR (P = 0.38). HIV was also detected in ulcer tissue from biopsy material from the patient with GERD but not herpes simplex virus esophagitis, In PCR-positive patients, ISH confirmed the presence of HIV in four patients (57%) with CMV and eight (73%) with IEU (P = 0.31). HIV was found only in inflammatory cells and not squamous epithelial cells. Given the similar prevalence of detection of HIV by PCR and ISH in ulcer tissue from both groups of HIV-infected patients as well as the location in rare inflammatory cells, we conclude that HIV infection of squamous mucosa does not appear to be the primary cause of IEU.