Abstract Aims Both human and non-human determinants have shaped Mediterranean forest structure over the last few millennia. The effects of recent human activities on forest composition, however, remain poorly understood. We quantified changes in forest composition during the past century in the mixed forests of Quercus suber (cork oak) and Q. canariensis (Algerian oak), and explored the effects of forest management and environmental (climate, topography) factors on forest structure at various spatial and temporal scales. Location Mountains north of the Strait of Gibraltar (southern Spain). Methods First, we quantified 20th-century changes in species composition from a series of inventories in nine mixed forests (c. 40,000 ha), and examined them in terms of the management practices and environmental conditions. Second, we analysed present-day Q. suber and Q. canariensis stand structure along environmental gradients at two spatial scales: (1) that of the forest landscape (c. 284 ha), combining local inventories and topographic variables and using a digital elevation model; and (2) regional (c. 87,600 km2), combining data from the Spanish Forest Inventory for the Andalusia region and estimates of climatic variables. Results Historical data indicate anthropogenic changes in stand composition, revealing a sharp increase in the density of cork oaks over the last century. Forest management has favoured this species (for cork production) at the expense of Q. canariensis. The impact of management is imprinted on the present-day forest structure. The abundance of both species increases with annual mean precipitation, and they coexist above 800 mm (the minimum threshold for Q. canariensis). Quercus suber dominates in most of the stands, and species segregation in the landscape is associated with the drainage network, Q. canariensis being clearly associated with moister habitats near streams. Main conclusions Our study quantitatively exemplifies a recent human-mediated shift in forest composition. As a result of forest management, the realized niche of the cork oak has been enlarged at the expense of that of Q. canariensis, providing further evidence for humans as major drivers of oak forest composition across the Mediterranean. Recent regeneration problems detected in Q. suber stands, a reduced demand for wood products, conservation policies, and climate change augur new large-scale shifts in forest composition.