Demographic population dynamics, gene flow, and local adaptation may influence each other and lead to coupling of ecological and evolutionary dynamics, especially in species inhabiting fragmented heterogeneous environments. Here, I review long-term research on eco-evolutionary spatial dynamics in the Glanville fritillary butterfly inhabiting a large network of approximately 4,000 meadows in Finland. The metapopulation persists in a balance between frequent local extinctions and recolonizations. The genetic spatial structure as defined by neutral markers is much more coarse-grained than the demographic spatial structure determined by the fragmented habitat, yet small-scale spatial structure has important consequences for the dynamics. I discuss three examples of eco-evolutionary spatial dynamics. (i) Extinction-colonization metapopulation dynamics influence allele frequency changes in the phosphoglucose isomerase (Pgi) gene, which leads to strong associations between genetic variation in Pgi and dispersal, recolonization, and local population dynamics. (ii) Inbreeding in local populations increases their risk for extinction, whereas reciprocal effects between inbreeding, population size, and emigration represent likely eco-evolutionary feedbacks. (iii) Genetically determined female oviposition preference for two host plant species exhibits a cline paralleling a gradient in host plant relative abundances, and host plant preference of dispersing females in relation to the host plant composition of habitat patches influences immigration (gene flow) and recolonization (founder events). Ecoevolutionary spatial dynamics in heterogeneous environments may not lead to directional evolutionary changes unless the environment itself changes, but eco-evolutionary dynamics may contribute to the maintenance of genetic variation attributable to fluctuating selection in space and time.habitat loss and fragmentation | life history ecology | population age