Habitat selection may have population level consequences and ultimately may influence a population's local persistence or extinction. We capitalized on a long-term study (1962-2004) of yellow-bellied marmots Marmota flaviventris in and around the Rocky Mountain Biological Laboratory, Gothic, Colorado, USA, and compared habitat characteristics associated with food availability and predation risk to explain variation in persistence of marmots at 27 sites, and their absence at 22 additional, randomly selected sites. We classified sites as persistent, intermittent or null based on whether there was a history of extinction; intermittent sites periodically went extinct and null sites never had marmots. Logistic regression analyses revealed that environmental variables associated with visibility and safety, rather than food, correctly classified sites as persistent or non-persistent as well as persistent or intermittent. Discriminant function analysis that included the null sites revealed that the same visibility-related characteristics predicted where marmots were found. These results highlight the importance of variation in safety among sites in predicting long-term population persistence, as well as a species' distribution.