We are in the process of developing a noninvasive test for gastric acid secretion based on the reaction of orally administered magnesium metal with gastric acid: Mg + 2HCl in equilibrium with MgCl2 + H2. We hypothesized that the hydrogen gas thus evolved could be detected in exhaled air and belches and that the amount of hydrogen released could be related to the amount of acid in the stomach. To validate this hypothesis, we gave magnesium to two groups of young adult volunteers following either betazole stimulation or cimetidine inhibition of acid secretion. In group I we gave subcutaneous betazole and gave magnesium in doses from 10 to 200 mg. In group II we gave oral betazole and used a constant dose of 150 mg of magnesium. In both groups we consistently detected significant increases in breath and belch hydrogen following magnesium in the betazole-stimulated volunteers. This response was blocked by cimetidine. The magnitude of the response was related to the magnesium dose, with 150 mg appearing to induce a maximum response. Administration of oral magnesium up to 200 mg was not associated with any untoward effects. We conclude that magnesium led to the release of hydrogen gas in vivo and that the quantity of hydrogen gas recovered was related to the amount of gastric acid. With further development, this principle might be used to develop a simple noninvasive test for gastric acid secretion.