Although territorial animals are able to maintain exclusive use of certain regions of space, movement data from neighboring individuals often suggest overlapping home ranges. To explain and unify these two aspects of animal space use, we use recently developed mechanistic models of collective animal movement. We apply our approach to a natural experiment on an urban red fox (Vulpes vulpes) population that underwent a rapid decline in population density due to a sarcoptic mange epizooty. By extracting details of movement and interaction strategies from location data, we show how foxes alter their behavior, taking advantage of sudden population-level changes by acquiring areas vacated due to neighbor mortality, while ensuring territory boundaries remain contiguous. The rate of territory border movement increased eightfold as the population declined and the foxes' response time to neighboring scent reduced by a third. By demonstrating how observed, fluctuating territorial patterns emerge from movements and interactions of individual animals, our results give the first data-validated, mechanistic explanation of the elastic disc hypothesis, proposed nearly 80 years ago.