Biodiversity increases the stability of ecosystem functions in fluctuating environments. Only recently, parts of the underlying processes have been uncovered. A meta-analysis of biodiversity experiments manipulating primary producer richness revealed that the increased stability in more diverse systems was driven by an increased resistance (i.e. reduced changes), rather that an increased resilience (i.e. a rapid recovery) following environmental changes. As many ecosystem functions, such as primary production, comprise the joint functional contribution of the species in the system, the stability of these ecosystem functions should inherently depend on changes in the system’s composition. Theoretical models predict that an increased number of species interactions should slow down compositional changes. By consequence, biodiversity is expected to increase both compositional and functional resistance, but these predictions have never been put to the test. In this article, Baert et al. use marine diatom microcosms to demonstrate this tight link between compositional and functional stability.