The composition of macroinvertebrate assemblages was studied at 31 sites in the Sado basin, a lowland area with intermittent rivers located in southern Portugal. Riparian features of the sites, including bankfull width, composition, cover, shade, and relative amount of tree debris, were also measured, and local and basin abiotic variables were determined. Woody vegetation in the Sado basin was species poor and was dominated by the ash Fraxinus angustifolia, the alder Alnus glutinosa, and the willows Salix alba and S. salvifolia. The study sites included a broad range of cover and riparian longitudinal integrity. Macroinvertebrate assemblages revealed low levels of richness (4-29 taxa, average 17.6) and Shannon's diversity (0.65-2.87 bits, average 1.89), and were dominated by species or groups (especially chironomids) that tolerate organic pollution and habitat disturbance. Assemblages were composed of collector-gatherers (5.4-100%, average 58.1), and to a lesser extent collector-filterers (0-81.3%, average 14.1) and shredders (0-25.5%, average 10.6). Partial canonical correspondence analysis was used to relate the macroinvertebrate assemblages to the riparian characteristics of a site and to local and basin abiotic variables. Out of 8 riparian variables, overhanging tree shade, total tree cover, and abundance of F angustifolia and A. glutinosa were significant predictors of assemblage variation. Of the 21 abiotic variables considered, only conductivity, distance from source, and the average number of flowless summer months were significant predictors of assemblage variation. Total macroinvertebrate variation was divided into portions that were: 1) explained solely by abiotic variables (similar to14%); 2) explained solely by riparian variables (similar to18%); 3) explained by both riparian and abiotic variables (similar to2%); and 4) unexplained (similar to66%). Riparian features had greater influence than other environmental characteristics on the composition of macroinvertebrate assemblages in the Sado basin, perhaps because riparian features are closely related to food types.