The investigation of flow–ecology relationships constitutes the basis for the development of environmental flow criteria. The need to understand hydrology–ecology linkages in natural systems has increased owing to the prospect of climate change and flow regime management, especially in water-scarce areas such as Mediterranean basins. Our research quantified the macroinvertebrate community response at family, genus and species level to natural flow regime dynamics in freshwater streams of a Mediterranean semiarid basin (Segura River, SE Spain) and identified the flow components that influence the composition and richness of biotic assemblages. Flow stability and minimum flows were the principal hydrological drivers of macroinvertebrate assemblages, whereas the magnitude of average and maximum flows had a limited effect. Perennial stable streams were characterized by flow sensitive lotic taxa (Ephemeroptera, Plecoptera and Trichoptera) and intermittent streams by predominately lentic taxa (Odonata, Coleoptera, Heteroptera and Diptera). Relatively minor biological changes were recorded for intermediate flow regime classes along a gradient of flow stability. Seasonal variation and minimum flows are key hydrological components that need to be considered for river management and environmental flows in the Segura River basin and other Mediterranean basins. The anthropogenic modification of these parameters, due to both human activities and climate change, would probably lead to significant changes in the structure and composition of communities in perennial stable streams. This would be characterized by a reduction of flow sensitive Ephemeroptera, Plecoptera and Trichoptera taxa and an increase in more resilient Odonata, Coleoptera, Heteroptera and Diptera taxa. Copyright © 2012 John Wiley & Sons, Ltd.