Abstract
Habitat fragmentation and loss are key threats to biodiversity, yet their impacts on marine species remain poorly understood. Clownfishes, which rely on sea anemones for shelter and reproduction, provide an interesting model to explore how ecological specialisation mediates species responses to habitat perturbations. We used whole-genome data from 382 individuals across 10 species with varying host specialisations to reconstruct demographic histories and infer spatial genetic structure to assess the impact of Pleistocene sea-level fluctuations. Generalist species, associated with multiple hosts, maintained stable effective population sizes ( Ne ) and population connectivity during habitat fragmentation, reflecting resilience to environmental instability. In contrast, specialists experienced severe Ne declines and genetic structuring, driven by their dependence on specific hosts, without signs of population recovery following habitat reconnection. Spatial genomic analyses identified the Indonesian Through-Flow as a key dispersal corridor and the Coral Triangle as a critical hub of genetic diversity, while continental shelves and extensive open ocean regions appeared as barriers to gene flow. Our findings reveal how host specialisation shapes clownfish population dynamics, emphasising the importance of incorporating ecological dependencies into conservation assessments and deepening our understanding of species responses to ecological constraints and environmental changes over evolutionary timescales.