## 1 Introduction  
Plant primary production is a key factor in ecosystem dynamics. Knowledge on the spatio-temporal changes in response to environmental variables, such as precipitation regime or herbivore pressure, is essential for better management of agro-pastoral systems and conservation areas [1, 2]. In bioclimatic regions with high climatic variability, such as the Mediterranean and semiarid regions, forecasting plant primary production is, however, particularly challenging. In such regions, seasonal drought periods represent a fundamental limitation for plant primary production due to the phenological shutdown of vegetation [3], and vegetation recovery after such droughts is further limited by environmental and/or anthropogenic stressors [4; 5]. In most of these regions, local flora has coexisted historically with large herbivores--both wild and, more recently, domestic. This prolonged interaction resulted in adaptive responses to grazing, which range from antagonistic traits, such as physical/chemical defenses or a high regrowth potential [6; 7], to mutualistic ones, such as seed dispersal by large herbivores [8; 9]. Although moderate levels of grazing may enhance plant productivity, facilitate smaller herbivores, and help maintain more diverse communities [6], overgrazing may also lead to reduced productivity, degraded vegetation cover, and impoverished ecosystems [10; 11], particularly in combination with drought [12]. The combination of trophic and non-trophic effects (e.g., mechanical damage by trampling) in overgrazed areas may strongly reduce plant productivity [13] and usually generates other impacts, such as changes in plant species composition (favoring less palatable species), limited tree regeneration, erosion, and soil degradation [5; 14]. The overgrazing impact on ecosystem resilience is particularly concerning because increased drought frequency and intensity caused by climate warming may be coinciding with increased stocking rates in extensive exploitations, incentivized by public regulations such as the per head payments of the European Common Agricultural Policy [15]. Free-ranging livestock breeding (ranching hereafter) is a widely used farming system in many areas around the world, often within natural areas of high conservation value, including protected areas. In ranching exploitations, livestock coexist with wild ungulate populations, which often show high population densities due to concomitant factors, such as hunting limitations and predator removal [16; 17]. In these cases, understanding the combined effect of plant-herbivore interactions with both groups of grazers (wild and domestic) is essential if we are to understand their impacts on ecosystem structure, functioning, and resilience [18; 19]. Even considering that low densities of livestock may increase plant production and benefit wild populations, the combined effect of wild and domestic ungulates may result in major impacts on vegetation composition and structure [20] and, if such pressures are maintained for long periods, shifts in plant communities may be irreversible or require decades to recover [21]. In Mediterranean and semiarid regions, the combined effects of the pronounced seasonality and the large inter-annual fluctuations in rainfall levels on plant productivity exacerbate the frequency and impact of overgrazing problems, and represent a key constraint for optimal ranch management [22; 23; 24]. These impacts are compounded by the strong legacy effects of overgrazing on plant productivity (e.g., [25]). Overgrazing during dry years depletes asexual organs and the seed bank, decreasing plant reproduction and productivity in the following growth season(s) even under conditions of abundant optimal rainfall and reduced grazing [26]. Similarly, large recruitment rates and survival during wet years increase the grazing pressure during the dry years that may follow, decreasing the resilience of the plant populations (and thus the ecosystem) [27].