In a randomized crossover trial, gastric acidity and gastric microbial colonization in 19 men infected with human immunodeficiency virus (HIV) (of whom nine had AIDS) were assessed. Gastric acidity was assessed during a baseline period and following pentagastrin or glutamic acid administration. Only two (22.2%)of the nine patients with AIDS and none of the non-AIDS patients were hypochlorhydric, as determined by maximal acid output. However, 60% and 67% of patients in the HIV-infected and AIDS groups, respectively, had persistently elevated gastric pH values during the baseline period. Both pentagastrin and glutamic acid significantly increased gastric acidity. Gastric colonization with Candida albicans and gram-positive mouth flora was common. Overall, this study demonstrates that many HIV-infected patients have elevated gastric pH values that may lead to alteration in drug absorption. The large degree of intrasubject and intersubject variability observed in gastric pH suggests that, unfortunately, one cannot predict which patients will have elevated gastric pH values.