Soil nitrogen (N) budgets are used in a global, distributed flow-path model with 0.5° × 0.5° resolution, representing denitrification and N
2
O emissions from soils, groundwater and riparian zones for the period 1900–2000 and scenarios for the period 2000–2050 based on the Millennium Ecosystem Assessment. Total agricultural and natural N inputs from N fertilizers, animal manure, biological N
2
fixation and atmospheric N deposition increased from 155 to 345 Tg N yr
−1
(Tg = teragram; 1 Tg = 10
12
g) between 1900 and 2000. Depending on the scenario, inputs are estimated to further increase to 408–510 Tg N yr
−1
by 2050. In the period 1900–2000, the soil N budget surplus (inputs minus withdrawal by plants) increased from 118 to 202 Tg yr
−1
, and this may remain stable or further increase to 275 Tg yr
−1
by 2050, depending on the scenario. N
2
production from denitrification increased from 52 to 96 Tg yr
−1
between 1900 and 2000, and N
2
O–N emissions from 10 to 12 Tg N yr
−1
. The scenarios foresee a further increase to 142 Tg N
2
–N and 16 Tg N
2
O–N yr
−1
by 2050. Our results indicate that riparian buffer zones are an important source of N
2
O contributing an estimated 0.9 Tg N
2
O–N yr
−1
in 2000. Soils are key sites for denitrification and are much more important than groundwater and riparian zones in controlling the N flow to rivers and the oceans.