Climate change may alter ecosystem functioning, as assessed via the net carbon (C) exchange (NEE) with the atmosphere, composed of the biological processes photosynthesis (GPP) and respiration (R eco). In addition, in semi-arid Mediterranean ecosystems, a significant fraction of respired CO2 is stored in the vadose zone and emitted afterwards by subsoil ventilation (VE), contributing also to NEE. Such conditions complicate the prediction of NEE for future change scenarios. To evaluate the possible effects of climate change on annual NEE and its underlying processes (GPP, R eco and VE) we present, over a climate/altitude range, the annual and interannual variability of NEE, GPP, R eco and VE in three Mediterranean sites. We found that annual NEE varied from a net source of around 130 gC m−2 in hot and arid lowlands to a net sink of similar magnitude for alpine meadows (above 2,000 m a.s.l) that are less water stressed. Annual net C fixation increased because of increased GPP during intermittent and several growth periods occurring even during winter, as well as due to decreased VE. In terms of interannual variability, the studied subalpine site behaved as a neutral C sink (from emission of 49 to fixation of 30 gC m−2 year−1), with precipitation as the main factor controlling annual GPP and R eco. Finally, the importance of VE as 0–23 % of annual NEE is highlighted, indicating that this process could shift some Mediterranean ecosystems from annual C sinks to sources.