BackgroundThe contribution of North Africa to the assembly of biodiversity within the Western Palaearctic is still poorly documented. Since the Miocene, multiple biotic exchanges occurred across the Strait of Gibraltar, underlying the high biogeographic affinity between the western European and African sides of the Mediterranean basin. We investigated the biogeographic and demographic dynamics of two large Mediterranean-adapted snakes across the Strait and assess their relevance to the origin and diversity patterns of current European and North African populations.ResultsWe inferred phylogeographic patterns and demographic history of M. monspessulanus and H. hippocrepis, based on range-wide multilocus data, combined with fossil data and species distribution modelling, under present and past bioclimatic envelopes. For both species we identified endemic lineages in the High Atlas Mountains (Morocco) and in eastern Iberia, suggesting their persistence in Europe during the Pleistocene. One lineage is shared between North Africa and southern Iberia and likely spread from the former to the latter during the sea-level low stand of the last glacial stage. During this period M. monspessulanus shows a sudden demographic expansion, associated with increased habitat suitability in North Africa. Lower habitat suitability is predicted for both species during interglacial stages, with suitable areas restricted to coastal and mountain ranges of Iberia and Morocco. Compiled fossil data for M. monspessulanus show a continuous fossil record in Iberia at least since the Pliocene and throughout the Pleistocene.ConclusionsThe previously proposed hypothesis of Pleistocene glacial extinction of both species in Europe is not supported based on genetic data, bioclimatic envelopes models, and the available fossil record. A model of range retraction to mountain refugia during arid periods and of glacial expansion (demographic and spatial) associated to an increase of Mediterranean habitats during glacial epochs emerges as a general pattern for mesic vertebrates in North Africa. Moreover, the phylogeographic pattern of H. hippocrepis conforms to a well-established biogeographic partition between western and eastern Maghreb.