1. Recent research has shown that biodiversity may have its greatest impact on ecosystem functioning in heterogeneous environments. However, the role of soil heterogeneity as a modulator of ecosystem responses to changes in biodiversity remains poorly understood, as few biodiversity studies have explicitly considered this important ecosystem feature.
2. We conducted a microcosm experiment over two growing seasons to evaluate the joint effects of changes in plant functional groups (grasses, legumes, non-legume forbs and a combination of them), spatial distribution of soil nutrients (homogeneous and heterogeneous) and nutrient availability (50 and 100 mg of nitrogen (N) added as organic material) on plant productivity and surrogates of carbon, phosphorous and N cycling (β-glucosidase and acid phosphatase enzymes and in situ N availability, respectively).
3. Soil nutrient heterogeneity interacted with nutrient availability and plant functional diversity to determine productivity and nutrient cycling responses. All the functional groups exhibited precise root foraging patterns. Above- and below-ground productivity increased under heterogeneous nutrient supply. Surrogates of nutrient cycling were not directly affected by soil nutrient heterogeneity. Regardless of their above- and below-ground biomass, legumes increased the availability of soil inorganic N and the activity of the acid phosphatase and β-glucosidase enzymes.
4. Our study emphasizes the role of soil nutrient heterogeneity as a modulator of ecosystem responses to changes in functional diversity beyond the species level. Functional group identity, rather than richness, can play a key role in determining the effects of biodiversity on ecosystem functioning.
5. Synthesis. Our results highlight the importance of explicitly considering soil heterogeneity in diversity–ecosystem functioning experiments, where the identity of the plant functional group is of major importance. Such consideration will improve our ability to fully understand the role of plant diversity on ecosystem functioning in ubiquitous heterogeneous environments.