Aim: To advance our understanding of the mechanisms that mediate the relationships between global climatic and anthropogenic processes and pathogen occurrence, it is crucial to evaluate the exact pathways connecting the ecological mediators and the pathogen responses across spatial and temporal heterogeneities at various scales. We investigated the pathways connecting these two types of heterogeneities in sand stabilization that were created by contrasting forces of various human activities and long-term droughts, and pathogen occurrence in host populations. The considered candidate ecological mediators were various components of host community structure, arthropod vector traits, and the pathogen occurrence in these vectors. Location: North-western Negev Desert's sands in Israel. Time period: 1982–2018. Major taxa studied: Gerbillus andersoni, Gerbillus floweri, Gerbillus gerbillus, Mycoplasma, Bartonella, Synosternus cleopatrae. Methods: We combined information from satellite images, 36 years of rodent censuses, a natural experiment, and causal modelling. Results: We found evidence that the spatial heterogeneity in sand biocrusts is largely correlated with structural differences between host communities, especially at medium spatial scales. Pathogen sampling, followed by causal modelling, suggested that the cascading effect of sand stabilization on pathogen occurrence is mainly mediated through changes in host community structure and vector burdens. Importantly, we found that structural changes in the same host community can simultaneously amplify and dilute different pathogens. Main conclusions: These findings suggest that global processes can translate into local processes, where the importance of the mediation effects depend on the magnitude of environmental heterogeneity. These mediation effects can benefit some organisms while adversely affecting others.