Illegal hunting of ungulates can reduce the prey base of carnivores, which can increase human-carnivore conflict (HCC) through livestock depredation. However, the relationship between ungulate poaching, wild prey abundance and livestock depredation has rarely been empirically studied. We surveyed 18 sites across the Hyrcanian forest in northern Iran; a global biodiversity hotspot under pressure from illegal hunting of ungulates, prey depletion, livestock grazing and HCC. We conducted three field surveys across 1204 km in 93 4×4 km cells to count signs of ungulate poaching as well as encounters with livestock and prey species of the Persian leopard Panthera pardus saxicolor and the grey wolf Canis lupus. We documented sheep/goat and cattle depredation from interviews with 201 herders and analysed the effects of illegal hunting of ungulates, forest cover, IUCN categories of reserves, elevation, distance to villages, and wild prey and livestock encounter rates on carnivore depredation rates using generalized linear models. Illegal hunting of ungulates was the most influential depredation predictor. An increase in the illegal hunting of ungulates by one sign/km significantly increased depredation by up to four times. We also found significantly lower levels of ungulate poaching in national parks (IUCN category II) compared to protected areas (V), wildlife refuges (IV) and no-hunting areas, though poaching signs were frequently found in most cells (58%). Encounters with livestock was inversely linked to wild prey species, but positively coupled with signs of ungulate poaching. Synthesis and applications. Our study reveals that: (i) an increase in the intensity of illegal hunting of ungulates can intensify livestock depredation by carnivores; (ii) future efforts in reducing human-carnivore conflict (HCC) to acceptable levels require a combination of law enforcement, prey recovery approaches and mitigation measures; (iii) it is essential to understand the root causes of po