Surveys targeting flagship species frequently record the presence of other species, providing valuable bycatch data to fill knowledge gaps on the ecology of overlooked species. Using bycatch records from camera-trap surveys for the tiger Panthera tigris, we model occupancy of the sun bear Helarctos malayanus, predict its temporal change in occupancy during 2015–2019 and determine its activity patterns in Bukit Barisan Selatan National Park, part of a UNESCO World Heritage Site in Sumatra, Indonesia. We performed single-season occupancy modelling that considered unequal detection probability from sun bear detection/non-detection records. We found that the sun bear occupancy in the Intensive Protection Zone (i.e. the priority protection area) of the National Park was slightly higher than in the north of the National Park. In the Intensive Protection Zone, sun bear occupancy was estimated to be 0.67 in 2015 and increased to 0.83 in 2019, but this increase was not substantial. The sun bear exhibited a cathemeral activity pattern. Most activity occurred during the day (46.2%), followed by night (21.2%), dusk (20.9%) and dawn (11.7%). We encourage collaboration amongst institutions conducting camera-trap studies in Sumatra to examine the ecology of other threatened yet overlooked species, to assess the broader biodiversity benefits of flagship species conservation and to strengthen science-based conservation efforts.