Research into the relationship between biodiversity and ecosystem functioning has mainly focused on the effects of species diversity on ecosystem properties in plant communities and, more recently, in food webs. Although there is growing recognition of the significance of nontrophic interactions in ecology, these interactions are still poorly studied theoretically, and their impact on biodiversity and ecosystem functioning is largely unknown. Existing models of mutualism usually consider only one type of species interaction and do not satisfy mass balance constraints. Here, we present a model of an interaction web that includes both trophic and nontrophic interactions and that respects the principle of mass conservation. Nontrophic interactions are represented in the form of interaction modifications. We use this model to study the relationship between biodiversity and ecosystem properties that emerges from the assembly of entire interaction webs. We show that ecosystem properties such as biomass and production depend not only on species diversity but also on species interactions, in particular on the connectance and magnitude of nontrophic interactions, and that the nature, prevalence, and strength of species interactions in turn depend on species diversity. Nontrophic interactions alter the shape of the relationship between biodiversity and biomass and can profoundly influence ecosystem processes.