Serpentine soils harbour a unique flora that is rich in endemics. We examined the evolution of serpentine endemism in Minuartia laricifolia, which has two ecologically distinct subspecies with disjunct distributions: subsp. laricifolia on siliceous rocks in the western Alps and eastern Pyrenees and subsp. ophiolitica on serpentine in the northern Apennines. We analysed AFLPs and chloroplast sequences from 30 populations to examine their relationships and how their current distributions and ecologies were influenced by Quaternary climatic changes. Minuartia laricifolia was divided into four groups with a BAPS cluster analysis of the AFLP data, one group consisted only of subsp. ophiolitica, while three groups were found within subsp. laricifolia: Maritime Alps, north-western Alps and central Alps. The same groups were recovered in a neighbour-joining tree, although subsp. ophiolitica was nested within the Maritime Alps group of subsp. laricifolia. Subspecies ophiolitica contained three different chloroplast haplotypes, which were also found in the Maritime Alps group of subsp. laricifolia. Given its high genetic diversity, subsp. ophiolitica appears to have arisen from subsp. laricifolia by vicariance instead of by long-distance dispersal. Genetic and geographic evidence point to the Maritime Alps populations of subsp. laricifolia as the closest relatives of subsp. ophiolitica. We hypothesize that M. laricifolia was also able to grow on nonserpentine rocks in the northern Apennines during glacial periods when the vegetation was more open, but that only the serpentine-adapted populations were able to persist until the present due to their competitive exclusion from more favourable habitats.