During the last few decades, land use changes have largely affected the global warming process through emissions of CO2. However, C sequestration in terrestrial ecosystems could contribute to the decrease of atmospheric CO2 rates. Although Mediterranean areas show a high potential for C sequestration, only a few studies have been carried out in these systems. In this study, we propose a methodology to assess the impact of land use and land cover change dynamics on soil organic C stocks at different depths. Soil C sequestration rates are provided for different land cover changes and soil types in Andalusia (southern Spain). Our research is based on the analysis of detailed soil databases containing data from 1357 soil profiles, the Soil Map of Andalusia and the Land Use and Land Cover Map of Andalusia. Land use and land cover changes between 1956 and 2007 implied soil organic C losses in all soil groups, resulting in a total loss of 16·8 Tg (approximately 0·33 Tg y−1). Afforestation increased soil organic C mostly in the topsoil, and forest contributed to sequestration of 8·62 Mg ha−1 of soil organic C (25·4 per cent). Deforestation processes implied important C losses, particularly in Cambisols, Luvisols and Vertisols. The information generated in this study will be a useful basis for designing management strategies for stabilizing the increasing atmospheric CO2 concentrations by preservation of C stocks and C sequestration. Copyright © 2012 John Wiley & Sons, Ltd.