Organisms -especially microbes -tend to live in complex communities. While some of these ecosystems are very bio-diverse, others aren't 1-3 , and while some are very stable over time others undergo strong temporal fluctuations 4,5 . Despite a long history of research and a plethora of data it is not fully understood what sets biodiversity and stability of ecosystems 6,7 . Theory as well as experiments suggest a connection between species interaction, biodiversity, and stability of ecosystems [8][9][10][11][12][13] , where an increase of ecosystem stability with biodiversity could be observed in several cases 7,9,14 . However, what causes these connections remains unclear. Here we show in microbial ecosystems in the lab that the concentrations of available nutrients can set the strength of interactions between bacteria. At high nutrient concentrations, extensive microbial growth leads to strong chemical modifications of the environment, causing more negative interactions between species. These stronger interactions exclude more species from the community -resulting in a loss of biodiversity. At the same time, these stronger interactions also decrease the stability of the microbial communities, providing a mechanistic link between species interaction, biodiversity and stability.