High rates of deforestation are presumed to adversely affect large-bodied mammal populations across South-east Asia. Understanding how these species respond to deforestation is therefore important for their conservation, particularly for more cryptic species that have proved a challenge to enumerate. Here, we use an occupancy approach based on detection/non-detection data collected over two survey periods to conduct the first assessment of spatio-temporal changes in sun bear distribution. We measured sun bear population trends through repeat camera-trap surveys and assessed their response to varying levels of deforestation in four study areas located in and around the 13 300 km2 Kerinci Seblat National Park (KSNP), Sumatra, from 2004/06 to 2009/11. The crude results suggested a decline in sun bear distribution, from 0.683 [0.519–0.810; 95% confidence intervals (CIs)] to 0.444 (0.253–0.584), but there were considerable overlaps in temporal CIs. This overall change in occupancy was partially driven by the significant decline (9.4%year−1) in one subpopulation living in the study area that underwent the highest rate of deforestation (0.96%year−1). Meanwhile, sun bear subpopulations living in areas experiencing lower deforestation rates (i.e. < 0.60%year−1) appear to be less affected by forest clearance. Our study demonstrates that occupancy modelling is a useful and replicable tool for monitoring sun bear populations in KSNP and elsewhere. Our results confirm that KSNP is a stronghold for sun bears, while also forewarning of the detrimental effects of ongoing illegal deforestation on sun bear distributions.