Abstract The socially parasitic Phengaris arion is one of the most threatened butterfly species in Europe. Using 12 microsatellite loci, we studied the genetic structure of 14 ecologically diverse populations (285 individuals) originating from two distinct areas of the European distribution range (Poland and Italy). Italian populations were more differentiated (FST = 0.124) than Polish populations (0.073). Nevertheless, in contrast to the results of previous studies on mitochondrial (COI) and nuclear (EF‐1α) genes, indices of genetic variability were higher in Poland. Within‐population genetic variability in Italy decreased southwards, whereas in Poland no similar gradient of changes was detected. Bayesian clustering of individuals (STRUCTURE, BAPS) and analysis of principal components (PCA) indicated a genetic structure in Italian sampling sites that was more pronounced than in Poland. The analysis also suggested a common evolutionary history for populations inhabiting the northern slopes of the Alps and Central Europe, or that the alpine populations are localised in a mixed zone of different post‐glacial colonisation routes (STRUCTURE, PCA). In addition, implementation of spatial information into the analysis (BAPS) suggested that the observed pattern of differentiation could be shaped simply by landforms as all Italian sampling sites and two mountainous Polish sites formed separate cluster. The pattern of ecological variation did not influence genetic structure and no grounds for separation of subspecies (P. arion ligurica and P. arion obscura) were found. Our results are therefore in agreement with conclusions inferred from other studies carried out in Europe on P. arion.