We evaluated, in an ex vivo rat model, two electrodes suitable for use in man for the endoscopic assessment of luminal and juxtamucosal pH in the upper gastrointestinal tract. Luminal and mucosal pH measurements were performed under stereomicroscopic control in the exposed stomach of the anesthetized rat, using 0.5-mm and 1-mm immersion depth electrodes in the presence of various luminal pH values and after pre-exposure to the mucolytic agent N-acetylcysteine. Both electrodes consistently recorded lumen-to-mucosa pH gradients in the gastric corpus and antrum, the neutralizing zone being located over the surface of the mucosa. These gradients were dissipated on mucosal exposure to a highly acid luminal fluid and after pre-treatment with N-acetylcysteine. These studies indicate that these microelectrodes do, indeed, reliably record lumen-to-mucosa pH gradients and suggest that this method may prove a useful tool for the investigation of mucosal protection in man. Discrepancies between the size of the electrode and the depth of the mucus gel layer, which predispose to simultaneous sampling of luminal and mucosal pH, together with a slow response time, may, however, limit the sensitivity of the technique.