Abstract. Nitrogen and phosphorus biogeochemical dynamics are crucial for the regulation of the terrestrial carbon cycle. In Earth System Models (ESMs) the implementation of nutrient limitations has been shown to improve the carbon cycle feedback representation and hence, improve the fidelity of the response of land to simulated atmospheric CO2 rise. Here we aimed to implement a terrestrial nitrogen and phosphorus cycle in an Earth system model of intermediate complexity to improve projections of the future CO2 fertilization feedbacks. The nitrogen cycle is an improved version of the Wania et al. (2012) Nitrogen (N) module, with enforcement of N mass conservation and the merger with a deep land-surface and wetland module that allows for the estimation of N2O and NO fluxes. The N cycle module estimates fluxes from three organic (litter, soil organic matter and vegetation) and two inorganic (NH4+ and NO3-) pools, accounts for inputs from biological nitrogen fixation and N deposition. The P cycle module contains the same organic pools with one inorganic P pool, it estimates influx of P from rock weathering and losses from leaching and occlusion. Two historical simulations are carried for the different nutrient limitation setups of the model: carbon and nitrogen (CN) and carbon, nitrogen and phosphorus (CNP), with a baseline carbon only simulation. The improved N cycle module now conserves mass and the added fluxes (NO and N2O), along with the N and P pools are within the range of other studies and literature. The implementation of nutrient limitation resulted in a reduction of GPP from the Carbon-Nitrogen (133 Pg yr-1) and Carbon-Nitrogen-Phosphorus (129 Pg yr-1) simulations by the year 2020, which implies that the model efficiently represents a nutrient limitation over the CO2 fertilization effect. CNP simulation resulted in a reduction of 10 % of the mean GPP and a reduction of 23 % of the vegetation biomass compared to baseline C simulation. These results are in better agreement with observations, particularly in tropical regions where P limitation is known to be important. In summary, the implementation of the nitrogen and phosphorus cycle have successfully enforced a nutrient limitation in the terrestrial system, which now have reduced the primary productivity and the capacity of land to uptake atmospheric carbon better matching observations.