Abstract. Many animal species have developed specific evolutionary adaptations to survive prolonged periods of low energy availability that characterize seasonal environments. The seasonal course of primary production, a major aspect of ecosystem functioning, should therefore be an important factor determining the habitat quality of such species. We tested this hypothesis by analyzing the relationship between habitat quality and ecosystem functioning for brown bears (Ursus arctos), a species showing hyperphagia and hibernation as evolutionary adaptation to seasonal peaks and bottlenecks in ecosystem productivity, respectively. Our unique long-term data set comprised data from two brown bear populations in northern Spain on historical presence, current presence, and reproduction. The data were classified on a grid of 5 3 5 km pixels into five classes: frequent reproduction, sporadic reproduction, frequent presence, sporadic presence, and recent extinction. We used the longterm average of the seasonal course of NDVI (normalized difference vegetation index) as a proxy for ecosystem functioning and investigated the relationship between habitat quality and ecosystem functioning with methods borrowed from statistical point-pattern analysis.We found that brown bears indeed selected habitat with specific ecosystem functioning (i.e., the variance in all habitat classes was smaller than in the landscape overall) and the relationship between habitat quality and ecosystem functioning was ordered. First, the average distance in ecosystem functioning between two habitat classes was larger if the difference in habitat quality was larger. Second, habitat for which there was the greatest need (i.e., breeding habitat) occupied the narrowest niche regarding ecosystem functioning and showed the most pronounced seasonality. Progressively poorer classes occupied wider niches that partly overlapped those of better classes. This indicated that nonbreeding animals are less selective.Our methodology provided new insight into the relationship between ecosystem functioning and habitat quality and could be widely applied to animal species living in seasonal environments. Because NDVI data are continuously collected, our methodology allows for continuous monitoring of changes in habitat quality due to global change.