We discuss results from controlled environment studies including mesocosms, grazing experiments and long term field experiments which show how biological N 2 fixation in legume based systems is tightly coupled to the N demand at scales ranging from the individual plant to the grassland ecosystem. We further test the consequences of this hypothesis of a feedback regulation of biological N 2 fixation by N demand with a mechanistic model linking plant community dynamics and ecosystem functioning. Results confirm the heuristic power of this hypothesis which accounts for a number of observations concerning changes in the relative abundance and N 2 fixation rate of legumes in managed grasslands. Then we show how nitrogen and carbon fluxes are affected by plant-plant (e.g. competition and facilitation), plant-soil and plant-herbivore interactions and by climate and management changes.