Questions What are the species and functional trait composition of riparian forests in near-natural Southwest European rivers? Are functional trait and species assemblages constrained by environment? Location Near-natural riparian habitats throughout mainland Portugal, Southwest Europe. Methods We collected data on riparian woody abundances and environmental variables from 175 river locations. Twenty-eight key functional traits were assigned to the surveyed species. Hierarchical clustering and indicator species analysis were used to derive compositional and functional groups of sites. We used Mantel tests to relate species and trait abundances and environmental gradients, and identified sets of relevant variables at diverse spatial scales. Then, four Dispersion indicators were developed to assess the extent to which the groups are constrained by the environment. These measures were tested for significance using iteration procedures. Results Clustering revealed four compositional groups of sites: Alder woods, Ash woods, Tree-heath shrublands and Semi-arid shrublands; and three functional groups: Mixed riparian forests, Shrublands with fleshy fruits and Stress-tolerant shrublands. These groups were primarily defined by broad-scale gradients of climate, elevation and river hierarchy. The most dispersed groups had broad trait composition (e.g. Mixed riparian forests) and were floristically diverse (Alder woods). In general, the compositional groups were more closely related to environmental gradients than the functional groups. Conclusions Assemblages with very specific functional traits or with homogeneous species composition were largely constrained to the most extreme environmental conditions in the study area. Future research to assist environmental management should be directed to the role of fine-scale environmental determinants of riparian assemblages, especially those related to flow variability and water stress.