Gastric mucus is thought to protect the underlying mucosal cells from mechanical hazards and back-diffusion of luminal H+. In health, a pH gradient exists across the mucus layer from the variable low pH of the lumen to a pH approaching neutrality at the epithelial cell surface. By current hypotheses this gradient is maintained by the combined effects of an unstirred layer, restricted or slowed diffusion of H+ in the mucus, and the epithelial cell secretion of bicarbonate, which is confined to the cell surface by the mucus layer. These mechanisms do not explain how H+ is secreted through mucus in the first place. Using a modified diffusion chamber we have shown that pig gastric mucus facilitates a low-efficiency Na+/H+ exchange--a property that helps to clarify some previously unexplained components of H+ secretion. When a solution containing Na+ was separated by a layer of fresh pig gastric mucus from a solution of similar pH containing a much lower concentration of sodium, the sodium-rich solution was electrically negative relative to the sodium-poor solution and its pH decreased significantly with time. A similar pH gradient developed when the barrier was a synthetic cation-exchange membrane, and one of opposite sign when it was an anion exchanger; no pH gradient developed across neutral barriers. It is suggested that similar electrical coupling of H+ diffusion to active Na+ transport might in vivo ensure that secreted H+ moves into the gastric lumen.