This study reconstructs and interprets the changing range of Atlas cedar in northern Morocco over the last 9,000 years. A synthesis of fossil pollen records indicated that Atlas cedars occupied a wider range at lower elevations during the mid-Holocene than today. The mid-Holocene geographical expansion reflected low winter temperatures and higher water availability over the whole range of the Rif Mountains relative to modern conditions. A trend of increasing aridity observed after 6,000 years BP progressively reduced the range of Atlas cedar and prompted its migration toward elevations above 1,400 masl. To assess the impact of climate change on cedar populations over the last decades, we performed a transient model simulation for the period between 1960 and 2010. Our simulation showed that the range of Atlas cedar decreased by about 75% over the last 50 years and that the eastern populations of the range in the Rif Mountains were even more threatened by the overall lack of water availability than the western ones. Today, Atlas cedar populations in the Rif Mountains are persisting in restricted and isolated areas (Jbel Kelti, Talassemtane, Jbel Tiziren, Oursane, Tidighine) that we consider to be modern microrefugia. Conservation of these isolated populations is essential for the future survival of the species, preserving polymorphisms and the potential for population recovery under different climatic conditions.