There is an active debate regarding the influence that climate has on the risk of armed conflict, which stems from challenges in assembling unbiased datasets, competing hypotheses on the mechanisms of climate influence, and the difficulty of disentangling direct and indirect climate effects. We use gridded historical non-state conflict records, satellite data, and land surface models in a structural equation modeling approach to uncover the direct and indirect effects of climate on violent conflicts in Africa and the Middle East (ME). We show that climate–conflict linkages in these regions are more complex than previously suggested, with multiple mechanisms at work. Warm temperatures and low rainfall direct effects on conflict risk were stronger than indirect effects through food and water supplies. Warming increases the risk of violence in Africa but unexpectedly decreases this risk in the ME. Furthermore, at the country level, warming decreases the risk of violence in most West African countries. Overall, we find a non-linear response of conflict to warming across countries that depends on the local temperature conditions. We further show that magnitude and sign of the effects largely depend on the scale of analysis and geographical context. These results imply that extreme caution should be exerted when attempting to explain or project local climate–conflict relationships based on a single, generalized theory.