A diagenetic model is presented that describes the effects of the steady-state reaction between oxygen and sulfide on pH distributions in porewaters. The model includes consumption of O2 and sulfide and the production of H+ by this oxidation reaction, fast association-dissociation reactions in the dissolved carbonate and sulfide systems, and separate diffusive transport of each of these solute species. Two mathematical forms for the oxidation kinetics are examined. The first is a nonlinear product of the oxygen and total sulfide concentrations, and the second is a spatially dependent sink in the form of a Gaussian function. This model is applied to the data obtained by JORGENSEN and REVSBECH (1983) in a Beggiatoa mat. Approximate numerical solution of the model with nonlinear kinetics shows that the oxygen and total sulfide profiles can be fit simultaneously with an oxidation rate constant of the order of 10(15) M-1 a-1. The best simulation to the associated pH profile is obtained by assuming a SIGMA-CO2 concentration of about 1.8 mM. This predicted profile agrees with the general shape and magnitude of the observed pH change; however, the calculated pH minimum is sharper than that seen in the data. Adoption of Gaussian kinetics leads to an analytical solution of the model, from which it is relatively easy to generate species profiles. With Gaussian kinetics, the model also predicts pH profiles similar to those observed except for the acuity of the minimum. The results of both kinetic models show that porewaters become rapidly undersaturated with respect to calcite. The best fit to the observed pH profile is obtained by reacting the oxygen and sulfide along a distinct interface in the sediments, while releasing the H+ byproduct of this reaction over a zone of nonzero thickness. This finding could be attributed to the biological nature of the oxidation reaction in which Beggiatoa attempt to consume reactants at a discrete depth to optimize the energy yield, but expel products on a larger scale due to the mobility of this organism and because there is no particular advantage in releasing the products at a distinct interface.