Abstract The influence of several environmental factors on the nitrous oxide production and denitrification in anoxic activated sludge has been studied in a Swedish wastewater treatment plant. Changes in temperature and in the concentrations of carbon source, nitrate or nitrite showed no significant influence on nitrous oxide production. Variations in pH correlated with changes in the amount of nitrous oxide produced. This correlation was found both with non-manipulated samples at different naturally occurring pH, and also in samples where the pH in activated sludge from the anoxic basin was changed experimentally. In non-manipulated samples, there was no nitrous oxide formation found at pH values above 6.8. The maximum nitrous oxide production was found when the pH was between 5 and 6.