This placebo-controlled trial compared the efficacy of single oral doses of cimetidine or ranitidine in maintaining intragastric pH and volume greater than 2.5 and less than 25 ml, respectively, in ambulatory surgery patients requiring general anesthesia. Patients were randomized to receive either placebo, ranitidine HCl 150 mg, or cimetidine HCl 400 mg upon rising on the morning of surgery. At induction, the cimetidine and ranitidine groups had significantly higher (p less than 0.05) gastric pH values than the placebo group. At extubation, the ranitidine group had a significantly higher (p less than 0.05) gastric pH than either the cimetidine or placebo group. Both H2-blocker groups had lower volumes when compared with the placebo group at extubation (p less than 0.05). There were more patients at risk for aspiration pneumonitis (pH less than 2.5 and/or volume greater than 25 ml) in the cimetidine group (46 percent) than in the ranitidine group (15 percent). All placebo-treated patients were at risk for aspiration pneumonitis. We did not find subjective clinical evidence of aspiration pneumonitis in our patients. We conclude that both ranitidine and cimetidine are superior to placebo, but ranitidine may be the preferred agent because of its more consistent effect on gastric pH and volume.