Intraluminal duodenal pH was recorded using a combined miniature electrode and logged digitally every 10 or 20 seconds for five hours (basal/meal/drink) in eight control subjects and 11 patients with duodenal ulcer (five on and off treatment with cimetidine). Over the whole test there were no significant differences in duodenal mean pH or log mean hydrogen ion activity (LMHa) between control subjects and patients with duodenal ulcer, but there were significantly longer periods of duodenal acidification (pH less than 4) and paradoxically more periods of duodenal alkalinisation (pH greater than 6) in the duodenal ulcer group compared with controls. After a meal duodenal mean pH and LMHa fell significantly in both controls and patients with duodenal ulcer, with more periods of duodenal acidification and alkalinisation in the duodenal ulcer group. An exogenous acid load (Coca-Cola) significantly increased the periods of duodenal acidification, and reduced alkalinisation, in both groups. Cimetidine significantly increased mean pH and LMHa and abolished the brief spikes of acidification in four of five patients with duodenal ulcer. Peak acid output (but not basal acid output) was significantly correlated with duodenal mean pH and LMHa but not with the periods of duodenal acidification. Smoking did not affect duodenal pH in either group.