Without genetic variation, species cannot cope with changing environments, and evolution does not proceed. In endangered species, adaptive potential may be eroded by decreased population sizes and processes that further reduce gene flow such as philopatry and local adaptations. Here, we focused on the philopatric and endangered loggerhead sea turtle (Caretta caretta) nesting in Cape Verde as a model system to investigate the link between adaptive potential and philopatry. We produced a dataset of three complementary genomic regions to investigate female philopatric behaviour (mitochondrial DNA), male-mediated gene flow (microsatellites) and adaptive potential (major histocompatibility complex, MHC). Results revealed genetically distinct nesting colonies, indicating remarkably small-scale philopatric behaviour of females. Furthermore, these colonies also harboured local pools of MHC alleles, especially at the margins of the population's distribution, which are therefore important reserves of additional diversity for the population. Meanwhile, directional male-mediated gene flow from the margins of distribution sustains the adaptive potential for the entire rookery. We therefore present the first evidence for a positive association between philopatry and locally adapted genomic regions. Contrary to expectation, we propose that philopatry conserves a high adaptive potential at the margins of a distribution, while asymmetric gene flow maintains genetic connectivity with the rest of the population