Owing to the present global biodiversity crisis, the biodiversity-stability relationship and the effect of biodiversity on ecosystem functioning have become major topics in ecology. Biodiversity is a complex term that includes taxonomic, functional, spatial and temporal aspects of organismic diversity, with species richness (the number of species) and evenness (the relative abundance of species) considered among the most important measures. With few exceptions (see, for example, ref. 6), the majority of studies of biodiversity-functioning and biodiversity-stability theory have predominantly examined richness. Here we show, using microbial microcosms, that initial community evenness is a key factor in preserving the functional stability of an ecosystem. Using experimental manipulations of both richness and initial evenness in microcosms with denitrifying bacterial communities, we found that the stability of the net ecosystem denitrification in the face of salinity stress was strongly influenced by the initial evenness of the community. Therefore, when communities are highly uneven, or there is extreme dominance by one or a few species, their functioning is less resistant to environmental stress. Further unravelling how evenness influences ecosystem processes in natural and humanized environments constitutes a major future conceptual challenge.