Abstract Aim The physiological requirements and tolerances of a species partially determine both its habitat preferences within a community and its broader geographic range. Therefore, we predicted that local ecology should be correlated with geographic distribution. We tested for a correlation between local ecology and range size, and we attempted to account for this correlation by the climate of the range. Location Bishop Creek Watershed, on the eastern side of the Sierra Nevada, California. Methods We recorded all plant species growing in each of 263 plots in the montane to alpine zones of the watershed. The local habitat preferences of 282 species were described in terms of wetness, elevation, soil, and amount of shade. The size and centre of the geographic range for each species were determined from regional floras. Results Wetness preference within the watershed was significantly correlated with range size. Specifically, plants of wet sites had larger ranges that extend to the north, whereas plants of dry sites tended to have smaller ranges centred to the east. The correlation between local wetness preference and range size was entirely explained by the location of the range centre of the species. Main conclusions A possible reason for the large ranges of mesophilic plants in our study area is that mesic habitats are continuous throughout the western Cordillera, while dry alpine habitats are isolated by valleys to the east. The correspondence between local ecology and geographic distributions implies evolutionary stasis in the niches of these plant species.