The taxonomic status of the freshwater mollusc fauna of the Iberian Peninsula it is reasonably well known, but, unlike other benthic macroinvertebrate, its distribution and ecology has been poorly studied. In this article, I study the relationships between environmental characteristics and distribution and community structure of freshwater molluscs along climatic, hydrological, physicochemical, and heterogeneity gradients in the southwestern Iberian Peninsula. Ninety-four sampling points were analysed, in which, in addition to habitat features, the presence/ absence and abundance of species were evaluated. The environmental gradients were measured by use of principal-components analysis (PAC), which orders the variables along two gradients: headwaters-mouth gradient (PC1) and water availability (PC2). According to canonical correspondence analysis (CCA), the main environmental factors related to species distribution and community structure were conductivity, permanency, channel width, turbidity, slope, and distance to the main river axis. The relationship between biodiversity (measured as species richness and the Shannon-Weiner diversity index), the ratio of the number of introduced species to the total number of species (zoogeographic integrity coefficient), and environmental variables was best explained by a regression model incorporating, basically, the permanence of water in streams as the variable that accounted for most of the variance. This study demonstrates that the distribution of freshwater molluscs along a Mediterranean gradient highly stressed by drought depends, mainly, on the hydrological stability and environmental conditions of the headwaters and estuarine sites.