Understanding the mechanisms underlying net ecosystem CO2 exchange (NEE) in mountain grasslands is important to quantify their relevance in the global carbon budget. However, complex interactions between environmental variables and vegetation on NEE remain unclear; and there is a lack of empirical data, especially from the high elevations and the Mediterranean region. A chamber-based survey of CO2 exchange measurements was carried out in two climatically contrasted grasslands (montane v. subalpine) of the Pyrenees; assessing the relative contribution of phenology and environmental variables on CO2 exchange at the seasonal scale, and the influence of plant functional type dominance (grasses, forbs and legumes) on the NEE light response. Results show that phenology plays a crucial role as a CO2 exchange driver, suggesting a differential behaviour of the vegetation community depending on the environment. The subalpine grassland had a more delayed phenology compared to the montane, being more temperature than water constrained. However, temperature increased net CO2 uptake at a higher rate in the subalpine than in the montane grassland. During the peak biomass, productivity (+74%) and net CO2 uptake (NEE +48%) were higher in the subalpine grassland than in the montane grassland. The delayed phenology at the subalpine grassland reduced vegetation's sensitivity to summer dryness, and CO2 exchange fluxes were less constrained by low soil water content. The NEE light response suggested that legume dominated plots had higher net CO2 uptake per unit of biomass than grasses. Detailed information on phenology and vegetation composition is essential to understand elevation and climatic differences in CO2 exchange.