Abstract Background Populations living in fragmented habitats may suffer from loss of genetic variation and reduced between-patch dispersal, which are processes that can result in genetic differentiation. This occurs frequently in species with reduced mobility, whereas genetic differentiation is less common among mobile species such as migratory birds. The high dispersal capacity in the latter species usually allows for gene flow even in fragmented landscapes. However, strongly philopatric behaviour can reinforce relative isolation and the degree of genetic differentiation. The Southern Dunlin (Calidris alpina schinzii) is a philopatric, long-distance migratory shorebird and shows reduced dispersal between isolated breeding patches. The endangered population of the Southern Dunlin breeding at the Baltic Sea has suffered from habitat deterioration and fragmentation of coastal meadows. We sampled DNA across the entire population and used 12 polymorphic microsatellite loci to examine whether the environmental changes have resulted in genetic structuring and loss of variation. Results We found a pattern of isolation-by-distance across the whole Baltic population and genetic differentiation between local populations, even within the southern Baltic. Observed heterozygosity was lower than expected throughout the range and internal relatedness values were positive indicating inbreeding. Conclusions Our results provide long-term, empirical evidence for the theoretically expected links between habitat fragmentation, population subdivision, and gene flow. They also demonstrate a rare case of genetic differentiation between populations of a long-distance migratory species. The Baltic Southern Dunlin differs from many related shorebird species that show near panmixia, reflecting its philopatric life history and the reduced connectivity of its breeding patches. The results have important implications as they suggest that reduced connectivity of breeding habitats can threaten even long-distance migrants if they show strong philopatry during breeding. The Baltic Southern Dunlin warrants urgent conservation efforts that increase functional connectivity and gene flow between breeding areas.