The study of determinants of species’ ranges along elevational gradients may shed light on the ecological factors that constrain their distribution and fundamental niche. We analysed the influence of the climate, habitat at different spatial scales and topography on Water Pipit Anthus spinoletta density in mountain landscapes across a wide elevational gradient. Variables associated with spring and annual temperature values were the main determinants of Water Pipit density, especially at the lower distributional limit (700–1200 m asl), where the species avoided warmer areas. At high-elevation sites (1600–2300 m asl), the main constraint to the species’ distribution was habitat structure and composition, with steep rocky areas being avoided. Highest densities were found in open but locally heterogeneous habitat at intermediate to high elevations, and the habitat variables that played a major role at the landscape scale were medium-tall shrublands and woodlands, but with contrasting effects depending on elevation. These results suggest that different sets of variables may constrain density, and effects may differ at the upper and lower elevational limits, with climate being more important at lower elevations and local habitat more important at higher elevations. Ongoing global warming is likely to cause an upward shift in range boundaries of alpine species, but local habitat features could constrain the upward expansion, resulting in range contractions accompanying range shift.