Size-selective harvesting of wild ungulates can trigger a range of ecological and evolutionary consequences. It remains unclear how environmental conditions, including changes in habitat, climate, and local weather conditions, dilute or strengthen the effects of trophy hunting. We analyzed horn length measurements of 2,815 male ibex (Capra pyrenaica) that were harvested from 1995 to 2017 in Els Ports de Tortosa i Beseit National Hunting Reserve in northeastern Spain. We used linear mixed models to determine the magnitude of inter-individual horn growth variability and partial least square path models to evaluate long-term effects of environmental change, population size, and hunting strategy on horn growth. Age-specific horn length significantly decreased over the study period, and nearly a quarter (23%) of its annual variation was attributed to individual heterogeneity among males. The encroachment of pine (Pinus spp.) forests had a negative effect on annual horn growth, possibly through nutritional impoverishment. The harvesting of trophy and selective individuals (e.g., small-horned males) from the entire population increased horn growth, probably because it reduced the competition for resources and prevented breeding of these smaller males. Local weather conditions and population size did not influence horn growth. Our study demonstrates how habitat changes are altering the horn growth of male ibex. We suggest that habitat interventions, such the thinning of pine forests, can contribute to securing the sustainability of trophy hunting. Even in situations where size-selective harvesting is not causing a detectable phenotypic response, management actions leading to the expansion of preferred land cover types, such as grass-rich open areas, can have a positive effect on ungulate fitness. Forest encroachment on open meadows and heterogeneous grasslands is pervasive throughout Mediterranean ecosystems. Therefore, our management recommendations can be extended to the landscape level, which will have the potential to mitigate the side effects of habitat deterioration on the phenotypic traits of wild ibex.