Land-use change is a global threat to biodiversity, but how land-use change affects species beyond the direct effect of habitat loss remains poorly understood. We developed an approach to isolate and map the direct and indirect effects of agricultural expansion on species of conservation concern, using the threatened giant anteater (Myrmecophaga tridactyla) in the Gran Chaco as an example. We reconstructed anteater occupancy change between 1985 and 2015 by fitting single-season occupancy models with contemporary camera-trap data and backcasting the models to 1985 and 2000 land-cover/use maps. Based on this, we compared the area of forest loss (direct effect of agricultural expansion) with the area where forests remained but occupancy still declined (indirect effect of agricultural expansion). Anteater occupancy decreased substantially since 1985, particularly after 2000 when agriculture expanded rapidly. Between 1985 and 2015, ~ 64,000 km2 of forest disappeared, yet occupancy declined across a larger area (~ 102,000 km2), extending far into seemingly untransformed habitat. This suggests that widespread sink habitat has emerged due to agricultural land-use change, and that species may lose their habitat through direct and indirect effects of agricultural expansion, highlighting the urgent need for broad-scale conservation planning in the Chaco. Appropriate management responses could proactively protect more habitat where populations are stable, and restore habitat or address causes of mortality in areas where declines occur. Our work also highlights how occupancy modelling combined with remote sensing can help to detect the direct and indirect effects of agricultural expansion, providing guidance for spatially targeting conservation strategies to halt extinctions.