Despite no obvious barriers to gene flow in the marine realm, environmental variation and ecological specializations can lead to genetic differentiation in highly mobile predators. Here, we investigated the genetic structure of the harbour porpoise over the entire species distribution range in western Palearctic waters. Combined analyses of 10 microsatellite loci and a 5085 base-pair portion of the mitochondrial genome revealed the existence of three ecotypes, equally divergent at the mitochondrial genome, distributed in the Black Sea (BS), the European continental shelf waters, and a previously overlooked ecotype in the upwelling zones of Iberia and Mauritania. Historical demographic inferences using approximate Bayesian computation (ABC) suggest that these ecotypes diverged during the last glacial maximum (c. 23–19 kilo-years ago, kyrbp). ABC supports the hypothesis that the BS and upwelling ecotypes share a more recent common ancestor (c. 14 kyrbp) than either does with the European continental shelf ecotype (c. 28 kyrbp), suggesting they probably descended from the extinct populations that once inhabited the Mediterranean during the glacial and post-glacial period. We showed that the two Atlantic ecotypes established a narrow admixture zone in the Bay of Biscay during the last millennium, with highly asymmetric gene flow. This study highlights the impacts that climate change may have on the distribution and speciation process in pelagic predators and shows that allopatric divergence can occur in these highly mobile species and be a source of genetic diversity.