1. Spatial variation in habitat quality and its demographic consequences have important implications for the regulation of animal populations. Theoretically, habitat quality is typically viewed as a single gradient from 'poor' to 'good', but in wild populations it is possible that there are multiple environmental gradients that determine spatial variation in demography. 2. Understanding environmental gradients is important to gain mechanistic insights into important population processes, but also to understand how populations might respond to environmental change. Here, we explore habitat and elevation gradients and their implications for population persistence using detailed long-term data on 600 individuals of the Mauritius kestrel. These data allow us to statistically separate spatial variation in demography from variation arising out of individual or environmental quality and explore its relationships with habitat and topography. 3. Birds that breed earlier in the season have higher reproductive success, and we found that the timing of breeding varies significantly between territories. This variation is primarily driven by elevation, with birds breeding progressively later as elevation increases. 4. Pre-fledging survival from the egg to fledgling stage (independently of timing), and recruitment, also varied significantly between territories. This variation is driven by the habitat surrounding breeding sites with increasing agricultural encroachment causing survival and recruitment to decline. 5. Taken together, our results suggest that there are likely to be multiple environmental gradients affecting spatial variation in productivity in wild populations, and hence multiple and different routes through which environmental change might have consequences for population dynamics by modifying spatial processes.