Species richness in an area is the result of environmental factors (e.g. primary productivity or habitat heterogeneity), historical factors (colonization, extinction, and human influences), and species interactions within the species assemblage. However, the relative importance of species assemblage, in respect to other factors, on species richness has rarely been analysed. This study analyses the relative importance of environment and species assemblage on vertebrate species richness in south-eastern Spain. The results show that 37 % of the variance in species richness was explained by the correlation between species assemblage and environmental-spatial variables. Species richness increased with habitat heterogeneity (habitat diversity and altitude range), but this effect was independent of species assemblage. Species richness differed among species assemblages in the study area, independently of the effect of environmental and spatial variables. Therefore, the findings suggest that species richness is also influenced by species composition per se, regardless of the influence of other variables. These findings imply that the use of species richness in indices for prioritizing conservation zones may bias conservation priorities towards species assemblages having more species richness. This problem, however, is solved when complementarity algorithms are used to prioritize conservation zones.