There is a great interest in ecology to understand the role of soil microbial diversity for plant productivity and coexistence. Recent research has shown increases in species richness of mutualistic soil fungi, the arbuscular mycorrhizal fungi (AMF), to be related to increases in aboveground productivity of plant communities. However, the impact of AMF richness on plant–plant interactions has not been determined. Moreover, it is unknown whether species-rich AMF communities can act as insurance to maintain productivity in a fluctuating environment (e.g. upon changing soil conditions). We tested the impact of four different AMF taxa and of AMF diversity (no AMF, single AMF taxa and all four together) on competitive interactions between the legume Trifolium pratense and the grass Lolium multiflorum grown under two different soil conditions, showing low and high sand contents. We hypothesized that more diverse mutualistic interactions (e.g. when four AMF taxa are present) can ease competitive effects between plants, increase plant growth and maintain plant productivity across different soil environments. We used quantitative PCR to verify that AMF taxa inoculated at the beginning of the experiment were still present at the end. The presence of AMF reduced the competitive inequality between the two plant species by reducing the growth suppression of the legume by the grass. High AMF richness enhanced the combined biomass production of the two plant species and the yield of the legume, particularly in the more productive soil with low sand content. In the less productive (high sand content) soil, the single most effective AMF had an equally beneficial effect on plant productivity as the mixture of four AMF. Since contributions of single AMF to plant productivity varied between soil conditions, higher AMF richness.