Hladnikia pastinacifolia RCHB., a narrow endemic, has an extremely restricted distribution in Trnovski gozd (Slovenia), despite the presence of many sites with suitable habitats. We compared the morphological traits of plants from different populations and habitats. The overall pattern showed that the smallest plants, with low fruit number, are found on Èaven (locus classicus or type locality); the largest individuals, with high fruit number, grow in the Golobnica gorge. As judged by plant size and seed set, the optimal habitats are screes. We used RAPD markers to estimate genetic variation between and within populations, as well as between and within the northern and the southern parts of the distribution area. Hladnikia showed only a low level of RAPD variability. AMOVA partitioned the majority of genetic diversity within selected populations. The low genetic differentiation between populations and their genetic depauperation indicates survival in situ, since the Trnovski gozd plateau most likely was a nunatak region in the southern Prealps during Pleistocene glaciations. Later range expansion of extant populations was limited by poor seed dispersal. We also analyzed the cpDNA trnL-F intergenic spacer to check whether the sequence is useful for studying the phylogenetic relationships of Hladnikia within the family Apiaceae (Umbelliferae). Our results support the assertion that H. pastinacifolia is an old taxon.