Quaternary climate and associated vegetational changes affected the fauna of the Chilean Mediterranean ecosystem. Here we studied the genetic variation of the long-haired mouse, Abrothrix longipilis, a sigmodontine rodent endemic to this area. Within an environmentally explicit context, we examined the geographic distribution of the genetic diversity and demographic history of the species based on sequences of the mitochondrial Cytochrome-b gene of 50 individuals from 13 localities and a large panel of single nucleotide polymorphisms of 17 individuals from 6 localities. The gene genealogy of A. longipilis revealed three intraspecific lineages that are allopatric and latitudinally segregated (northern, central, and southern lineages) with an estimated crown age for the whole species clade of 552.3 kyr B.P. A principal component analysis based on 336,596 SNP loci is in line with the information given by the the mitochondrial gene genealogy. Along its complete distributional range, A. longipilis showed patterns of isolation by distance and also isolation by environment. The general pattern of historical demography showed stability for most intraspecific lineages of A. longipilis. Northern and central lineages showed signals of historical demographic stability, while the southern lineage showed contrasting signals. In agreement with this, the niche models performed showed that in the northern range of A. longipilis, areas of high suitability for this species increased towards the present time; areas of central range would have remained relatively stable, while southern areas would have experienced more change through time. In summary, our study shows three distinct allopatric lineages of A. longipilis, each showing slightly different demographic history.