The community composition and spatial distribution of benthic macroinvertebrates were studied along the Ebro estuary, a highly stratified estuary located in the NE Iberian Peninsula. During the last decade the oligotrophication process occurring in the lower Ebro River and its estuary has allowed a complex benthic macroinvertebrate community to become established; these results contrast with the poor community found there in the early nineties. A total of 216 taxa were identified, and polychaetes dominated the community both in abundance and species richness. The results showed spatial differences in the structure and composition of macroinvertebrates, which suggests that there are two distinct communities along the estuary. Each community was found in a specific stretch (upper and lower estuary) in function of the presence of the salt wedge. The macrobenthos of the upper estuary was dominated by freshwater taxa, but some euryhaline species were also found. The lower estuary showed a marine community typical of shallow Mediterranean environments. The transition between these two communities fits an ecotone model. The highest abundances, richness and diversities were recorded at the lower estuarine stations, especially those closer to the river mouth, whereas the lowest values corresponded to the stations adjacent to the tip of the salt wedge.