The ocean is estimated to contribute up to ~20% of global fluxes of atmospheric nitrous oxide (N2O), an important greenhouse gas and ozone depletion agent. Marine oxygen minimum zones contribute disproportionately to this flux. To further understand the partition of nitrification and denitrification and their environmental controls on marine N2O fluxes, we report new relationships between oxygen concentration and rates of N2O production from nitrification and denitrification directly measured with 15N tracers in the Eastern Tropical Pacific. Highest N2O production rates occurred near the oxic‐anoxic interface, where there is strong potential for N2O efflux to the atmosphere. The dominant N2O source in oxygen minimum zones was nitrate reduction, the rates of which were 1 to 2 orders of magnitude higher than those of ammonium oxidation. The presence of oxygen significantly inhibited the production of N2O from both nitrification and denitrification. These experimental data provide new constraints to a multicomponent global ocean biogeochemical model, which yielded annual oceanic N2O efflux of 1.7–4.4 Tg‐N (median 2.8 Tg‐N, 1 Tg = 1012 g), with denitrification contributing 20% to the oceanic flux. Thus, denitrification should be viewed as a net N2O production pathway in the marine environment.