Abstract. Climate change in the Mediterranean, associated with warmer temperatures and more frequent droughts, is expected to impact forest productivity and the functioning of forests ecosystems as carbon reservoirs in the region. Climate warming can positively affect forest growth by extending the growing season, whereas increasing summer drought generally reduces forest productivity and may cause growth decline, trigger dieback, hamper regeneration, and increase mortality. Forest management could potentially counteract such negative effects by reducing stand density and thereby competition for water. The effectiveness of such interventions, however, has so far mostly been evaluated for short time periods at the tree and stand levels, which limits our confidence regarding the efficacy of thinning interventions over longer time scales under the complex interplay between climate, stand structure, and forest management. In this study, we use a century-long historical data set to assess the effects of climate and management on forest productivity. We consider rear-edge Scots pine (Pinus sylvestris) populations covering continental and Mediterranean conditions along an altitudinal gradient in Central Spain. We use linear mixed-effects models to disentangle the effects of altitude, climate, and stand volume on forest growth and ingrowth (recruitment and young trees' growth). We find that warming tends to benefit these tree populations, warmer winter temperature has a significant positive effect on both forest growth and ingrowth, and the effect is more pronounced at low elevations. However, drought conditions severely reduce growth and ingrowth, in particular when competition (stand volume) is high. We conclude that summer droughts are the main threat to Scots pine populations in the region, and that a reduction of stand volume can partially mitigate the negative impacts of more arid conditions. Mitigation and adaptation measures could therefore manage stand structure to adopt for the anticipated impacts of climate change in Mediterranean forest ecosystems.