To determine the relation and possible significance of gastric hypoaciditity to chronic diarrhea in AIDS, patients with and without chronic (>1 month) diarrhea underwent fasting gastric juice pH measurement and microbiologic study and upper and lower endoscopy with biopsy. All 8 patients with diarrhea and high gastric pH (>3; mean, 6.1 +/- 1.0) had gastric bacterial overgrowth (>10(4) bacteria/mL) along with opportunistic enteropathogens in the duodenum or rectosigmoid, but only 1 of 6 patients with diarrhea and gastric pH in the normal range (less-than-or-equal-to 3; mean, 1.9 +/- 0.7) had overgrowth or an opportunistic enteropathogen. By contrast, all but 1 of 9 controls (AIDS patients without diarrhea) had normal fasting gastric pH (mean, 2.9 +/- 1.5). Overall, the presence of gastric hypoacidity was associated with identification of opportunistic enteropathogens (P = .035). Thus, gastric hypoacidity is associated with quantitative bacterial overgrowth and opportunistic enteric infections and may be etiologically important in the pathophysiology of the chronic diarrhea seen in some AIDS patients.