Nematode species are widely tolerant of environmental conditions and disperse passively. Therefore, the species richness distribution in this group might largely depend on the topological distribution of the habitats and main aerial and aquatic dispersal pathways connecting them. If so, the nematode species richness distributions may serve as null models for evaluating that of other groups more affected by environmental gradients. We investigated this hypothesis in lakes across an altitudinal gradient in the Pyrenees. We compared the altitudinal distribution, environmental tolerance, and species richness, of nematodes with that of three other invertebrate groups collected during the same sampling: oligochaetes, chironomids, and nonchironomid insects. We tested the altitudinal bias in distributions with t‐tests and the significance of narrow‐ranging altitudinal distributions with randomizations. We compared results between groups with Fisher's exact tests. We then explored the influence of environmental factors on species assemblages in all groups with redundancy analysis (RDA), using 28 environmental variables. And, finally, we analyzed species richness patterns across altitude with simple linear and quadratic regressions. Nematode species were rarely biased from random distributions (5% of species) in contrast with other groups (35%, 47%, and 50%, respectively). The altitudinal bias most often shifted toward low altitudes (85% of biased species). Nematodes showed a lower portion of narrow‐ranging species than any other group, and differed significantly from nonchironomid insects (10% and 43%, respectively). Environmental variables barely explained nematode assemblages (RDA adjusted R2 = 0.02), in contrast with other groups (0.13, 0.19 and 0.24). Despite these substantial differences in the response to environmental factors, species richness across altitude was unimodal, peaking at mid elevations, in all groups. This similarity indicates that the spatial distribution of lakes across altitude is a primary driver of invertebrate richness. Provided that nematodes are ubiquitous, their distribution offers potential null models to investigate species richness across environmental gradients in other ecosystem types and biogeographic regions.