Many recent studies have explored the effects of present and past landscape structure on species distribution and diversity. However, we know little about the effects of past landscape structure on distribution of genetic diversity within and between populations of a single species. Here we describe the relationship between present and past landscape structure (landscape connectivity and habitat size estimated from historical maps) and current genetic structure in a perennial herb, Succisa pratensis. We used allozymes as co-dominant markers to estimate genetic diversity and deviation from Hardy–Weinberg equilibrium in 31 populations distributed within a 5 km2 agricultural landscape. The results showed that current genetic diversity of populations was related to habitat suitability, habitat age, habitat size and habitat connectivity in the past. The effects of habitat age and past connectivity on genetic diversity were in most cases also significant after taking the current landscape structure into account. Moreover, current genetic similarity between populations was affected by past connectivity after accounting for current landscape structure. In both cases, the oldest time layer (1850) was the most informative. Most populations showed heterozygote excess, indicating disequilibrium due to recent gene flow or selection against homozygotes. These results suggest that habitat age and past connectivity are important determinants of distribution of genetic diversity between populations at a scale of a few kilometres. Landscape history may significantly contribute to our understanding of distribution of current genetic structure within species and the genetic structure may be used to better understand landscape history, even at a small scale.