a, The relative change in the number of arthropod species between the first two and the final two study years was similar for managed (n = 19) and unmanaged (n = 9) forest sites (z = 0.648, P = 0.517, derived from a linear mixed model with relative difference in species number as response, harvesting category as fixed and region as random effect). Dots show raw data per site. Boxes represent data within the 25th and 75th percentile, black lines show medians, and whiskers show 1.5× the interquartile range. b, When considering actual tree mortality between forest inventories in 2009 and 2016, declines in the number of arthropod species were weaker at sites with higher tree mortality (z = 2.536, P = 0.011, derived from a linear mixed model with relative difference in species number as response, tree mortality as fixed and region as random effect). Dots show raw data per site. The blue line visualizes the significant relationship between the change in the number of arthropod species and tree mortality based on the linear mixed model, and the shaded area represents confidence intervals. This suggests that changes in habitat conditions and heterogeneity linked to tree mortality—such as increasing canopy openness, herb cover or deadwood availability—moderated declines in the number of arthropod species. More research is needed to identify mechanistic relationships. Tree mortality included both natural mortality and timber harvesting. Forest sites had a stand age of, on average, 116 years (minimum of 30 years and maximum of 180 years) and therefore did not include overmature stands. Owing to stand age and because management was abandoned 20 to 70 years before this study started, natural tree mortality was low even in unmanaged stands. We expect increasingly positive effects of natural tree mortality and associated increased structural diversity and heterogeneity40 on arthropod trends with increasing stand age, but further research is required. In Germany, harvesting is usually conducted as shelterwood cutting. In our sites, the harvested amount over the course of our study reached a maximum of 1% of the standing volume per year. More intense harvesting systems (such as clear cutting), which lead to less heterogeneous habitat conditions, may not have similar moderating effects on arthropod declines.