Understanding what mechanisms shape the diversity and composition of biological assemblages across broad-scale gradients is central to ecology. Litter-consuming detritivorous invertebrates in streams show an unusual diversity gradient, with a-diversity increasing towards high latitudes but no trend in ?-diversity. We hypothesized this pattern to be related to shifts in nestedness and several ecological processes shaping their assemblages (dispersal, environmental filtering and competition). We tested this hypothesis, using a global dataset, by examining latitudinal trends in nestedness and several indicators of the above processes along the latitudinal gradient. Our results suggest that strong environmental filtering and low dispersal in the tropics lead to often species-poor local detritivore assemblages, nested in richer regional assemblages. At higher latitudes, dispersal becomes stronger, disrupting the nested assemblage structure and resulting in local assemblages that are generally more species-rich and non-nested subsets of the regional species pools. Our results provide evidence that mechanisms underlying assemblage composition and diversity of stream litter-consuming detritivores shift across latitudes, and provide an explanation for their unusual pattern of increasing a-diversity with latitude. When we repeated these analyses for whole invertebrate assemblages of leaf litter and for abundant taxa showing reverse or no diversity gradients we found no latitudinal patterns, suggesting that function-based rather than taxon-based analyses of assemblages may help elucidate the mechanisms behind diversity gradients.