Although the assembly of stream macroinvertebrates is regulated by environmental heterogeneity at multiple spatial scales, field bioassessment studies that explicitly considered such scale-dependency are rare. Here, we investigated how large scale longitudinal gradients and local microhabitat structure jointly regulate the assembly of macroinvertebrate communities along a Mediterranean river. We compared community composition, metrics and functional feeding traits among three microhabitat categories (grain-size [20 cm; grain-size \20 cm; organic substrata) along three river sectors (up-, middle-, downstream), which reflected a gradient of anthropogenic modification. Macroinvertebrate assemblages varied mostly over the large-scale longitudinal gradient, but the influence of local micro-habitat features was evident at the withinsector scale. The effects of micro-habitats appeared stronger for feeding traits compared to simple taxonomic metrics, supporting the hypothesis that feeding traits are sensitive to river substratum character. Betadiversity among micro-habitat types was smaller in the modified downstream sector, which supported more homogeneous communities. An explicit consideration of spatial scales is recommended when interpreting results from environmental assessment studies. In the Aniene River, the influence of local-scale substratum character on macroinvertebrates depended on the longitudinal gradient in anthropogenic pressure. Also, the findings suggest that taxonomic and functional metrics reflect processes operating at different spatial scales.Electronic supplementary material The online version of this article (