Abstract Aim Long-term climatic variation has generated historical expansions and contractions of species ranges, with accompanying fragmentation and population bottlenecks, which are evidenced by spatial variation in genetic structure of populations. We examine here hypotheses concerning dispersal and vicariance in response to historical geoclimatic change and potential isolation produced by mountains and water barriers. Location The temperate rain forest of southern South America, which is distributed from coastal Chile, including the large continental island of Chiloé, across the Andes into Argentina. Methods We investigated our hypotheses in the phylogenetically and biogeographically relictual marsupial Dromiciops gliroides. We examined 56 specimens, which resulted from field samples and museum study skins from 21 localities. We evaluated the influence of two major barriers, the Andean cordillera and the waterway between the mainland and the large island of Chiloé, by performing Bayesian and maximum-likelihood phylogenetic analyses on sequences of 877 base pairs of mitochondrial DNA. We further tested the contribution of the proposed geographical barriers using analysis of molecular variance (amova). We also evaluated the responses of populations to historical north–south shifts of habitat associated with glacial history and sea-level change. Results Our analyses revealed a phylogeny with three clades, two of which are widespread and contain nearly all the haplotypes: a northern clade (36–39° S) and a southern clade (40–43° S). These two clades contain forms from both sides of the Andes. Within the southern clade, island and mainland forms were not significantly differentiated. Tests of recent demographic change revealed that southern populations have experienced recent expansion, whereas northern populations exhibit long-term stability. The direction of recent gene flow and range expansion is predominantly from Chile to Argentina, with a modest reciprocal exchange across the Andes. Recent gene flow from the island of Chiloé to the mainland is also supported. Main conclusions The genetic structure of contemporary D. gliroides populations suggests recent gene flow across the Andes and between the mainland and the island of Chiloé. Differences in demographic history that we detected between northern and southern populations have resulted from historical southward shifts of habitat associated with glacial recession in South America. Our results add to a growing literature that demonstrates the value of genetic data to illuminate how environmental history shapes species range and population structure.