Introduction

Environments have been reshaped by humans globally and at unprecedented rates during the Anthropocene (Otto 2018; Steffen et al. 2018). As a consequence, ecosystems and organisms are increasingly under pressure through the loss of habitat (Farneda et al. 2020) and decreasing connectivity due to landscape fragmentation (Johnson et al. 2017). Among central European habitats, semi-natural grasslands are hotspots of biodiversity (Moeslund et al. 2013). However, the area of semi-natural grasslands has been declining in the last century due to agricultural intensification, e.g. through increasingly applied fertilizer and pesticides (Habel et al. 2016; Seibold et al. 2019), but also because of increased urbanization (Maes and Van Dyck 2001). This development has not only affected the total area and quality of these grasslands (Maes and Van Dyck 2001), but also impacted the connectivity among them (Soons et al. 2005; Herse et al. 2020). Habitat fragmentation limits movement success (Bolliger and Silbernagel 2020) and reduces gene flow (Burkart et al. 2016; but see Luqman et al. 2018) with impacts cascading to higher levels such as ecosystem services (Sauter et al. 2019). Therefore, changes in land use and associated loss and fragmentation of habitat affect biodiversity at all its levels.

Numerous butterfly species rely on semi-natural grasslands (van Swaay et al. 2006). For example, two thirds of the known butterfly species of Europe are found in dry calcareous grasslands (Wallis de Vries and van Swaay 2009), a special type of semi-natural grassland. Consequently, the degradation and decline of grasslands has led to a decrease in butterfly species richness and abundance (Habel et al. 2019). Depending on the habitat requirements (area, quality), dispersal ability, and population density of a particular species, a landscape may appear more fragmented for a less mobile butterfly species with higher specialized habitat demands than for mobile and generalist species. This means that populations of specialist butterfly species are likely more often genetically differentiated (Louy et al. 2007), hence they are more strongly affected by the same land-use changes than generalist species (Engler et al. 2014). Recently, also once-common butterfly species have declined in population size (Kadlec et al. 2010). At the same time, small populations are particularly vulnerable to consequences of habitat loss and fragmentation at the genetic level. In small populations, genetic diversity may be lost due to strong effects of genetic drift (Amos and Balmford 2001) or inbreeding depression, eventually leading to reduced fitness (Frankham 2005).

Biodiversity monitoring is essential to identify and evaluate the long-term status of natural populations and communities and serves as an important early warning system for detecting negative trends. Although called for in biodiversity strategies, genetic diversity is often not part of ongoing monitoring programs (Laikre et al. 2020; O’Brien et al. 2022). However, genetic information has proven particularly valuable as it allows drawing conclusions on the effects of reduced connectivity for long-term population persistence (DiLeo et al. 2017; Schoville et al. 2018). It is therefore of prime importance to consider monitoring temporal changes in genetic diversity, a fundamental pre-requisite for evolutionary processes in view of global change (Leigh et al. 2019).

Prior to evaluating and monitoring how recent changes in habitat area, connectivity, and quality may have affected the genetic composition of a species, we need a firm understanding of the historical processes that have shaped the spatial genetic structure of a given species. Most prominently, postglacial migration has left imprints in the spatial genetic structure that are still detectable using molecular markers (Taberlet et al. 1998). These processes are predominantly governed by dispersal out of glacial refugial areas into currently occupied ranges, in conjunction with demographic processes such as fluctuating population sizes, founder events and bottleneck effects (Allendorf et al. 2022). Assuming gradual poleward migration, one would expect to find a pattern of isolation by distance (IBD), which is determined by the interplay between gene flow and random genetic drift (Hutchison and Templeton 1999). However, landscape features such as mountains without suitable habitat may act as barriers to gene flow, tantamount with stronger genetic differentiation over seemingly shorter distance. Such effects can be accounted for by considering such landscape resistance, e.g., altitudinal change in addition to purely horizontal, Euclidean distance in the case of mountains.

In this study, we adopted a landscape-scale approach to analyze patterns of genetic diversity, which largely reflect historical processes that acted on populations. To do so, we made use of the established Biodiversity Monitoring program of Switzerland for sampling the Marbled White (Melanargia galathea) on a regular grid across Switzerland over five years. Specifically, we asked: What is the genetic structure of M. galathea in Switzerland? How is genetic diversity distributed across Switzerland and do estimates of genetic diversity change over the five-year period of sampling? To what degree and at what spatial scale do geographic distance and topography explain the observed spatial genetic structure? We put these results into a context of postglacial re-colonization and evaluate if there are areas of increased genetic diversity that could be particularly relevant for conservation purposes.

Materials and methods

Study species

Melanargia galathea (Linnaeus, 1758; Lepidoptera, Nymphalidae) is a widely distributed butterfly species with a distribution range spanning between Western and Central Europe to the Caspian Sea (Ebert & Rennwald 1991). In Switzerland, the species is found in most regions except at elevations higher than 2500 m a.s.l. in the Alps (Lepidopterologen-Arbeitsgruppe 1994). The main habitat of M. galathea are dry meadows and pastures (Delarze et al. 2015). These extensively managed grasslands have strongly declined over the past century in Switzerland (Lachat et al. 2010), fragmenting available habitat for M. galathea. However, M. galathea can also be found in secondary habitats such as road verges (Ebert & Rennwald 1991; Vandewoestijne et al. 2004).

The flight season of the adults (imagines) starts in early summer and lasts for about six weeks or more (Lepidopterologen-Arbeitsgruppe 1994; Habel et al. 2010). Important nectar plants of imagines are for example Centaurea jacea, C. scabiosa, Knautia arvensis and Scabiosa columbaria along with other purple-flowered plants, while the caterpillar feeds on grasses, predominantly Bromus erectus, Festuca spp. and Brachypodium pinnatum (Ebert & Rennwald 1991). The imago is relatively mobile compared to other butterfly species (Habel et al. 2013) and can disperse up to 2 km, although the average dispersing distance is much smaller (Baguette et al. 2000). Contemporary gene flow is thus mainly local, but moving between stepping-stone habitats over generations accumulates dispersal distance.

Study area and sampling

Switzerland comprises roughly 41 000 km2, with a pronounced topography dominated by the European Alps, hence a strong altitudinal gradient ranging from 196 to 4634 m a.s.l. Distinct biogeographic regions can be delimited (Fig. 1), which often relate to species occurrence, but may also reflect genetic differences (e.g., Pasinelli et al. 2001; Csilléry et al. 2020). An estimated 37 000 ha of dry meadows and pastures remain in Switzerland, which equals a loss of 95% of such habitat since 1900 (Lachat et al. 2010). While only part of these grasslands remains potential habitat for M. galathea after substantial intensification over the past decades, newly established patches of grassland, such as road verges, partly compensate for the habitat area lost elsewhere.

Fig. 1
figure 1

Sampling locations of Melanargia galathea in Switzerland, categorized according to sampling year during the period 2013–2017, according to the regular sampling grid of the Biodiversity Monitoring (BDM) Switzerland (small grey dots). Circle size relates to sample size per location (n = 1–32). Superimposed are the biogeographic regions of Switzerland (names in boxes). Three cantons to which genetic clusters (see below) are related are specifically named (in italics)

The Swiss Biodiversity Monitoring (BDM) assesses butterfly diversity and abundance in about 450 plots of 1 km2 that are accessible on a regular, systematic grid across Switzerland, with higher density in the Jura mountains and in Southern Switzerland (Fig. 1; Weber et al. 2004). Each year, one fifth of these plots are visited up to seven times during the summer of the respective sampling year (Weber et al. 2004; Forum Biodiversität Schweiz 2022). It thus takes five years to complete the survey for the entire country, in the case of our butterfly sampling during the period 2013–2017. To sample tissue for genetic analyses, individuals of M. galathea were captured during standard BDM butterfly recording, and one leg per living M. galathea individual was collected for a maximum of 15 individuals, rarely more, per plot and year. After sampling, the butterflies were released. The removal of a leg is commonly considered to mimic natural leg loss (e.g., through predation attempts) and should therefore not adversely affect butterfly mortality (Koscinski et al. 2011). In total, 1660 individuals were sampled in 189 plots (1–32 tissue samples per plot). Samples were put in glassine bags for drying and stored at -20 °C until DNA extraction.

DNA extraction and genotyping

Only femurs of sample tissues were used for DNA extraction. They were placed in collection microtubes from Qiagen (Hilden, Germany) when samples were extracted in 96-well plates, or in 1.5 ml Eppendorf tubes for single-tube extractions, in both cases together with a stainless-steel bead 3.1 mm in diameter. Samples were ground with a Retsch mixer mill 300 (Haan, Germany) for maximum four minutes with maximum amplitude. Plate extractions were conducted with Qiagen DNeasy 96 Blood & Tissue Kit, and single extractions with Qiagen DNeasy Tissue Kit according to the manufacturer’s protocol, with the exception that the final elution step was done twice with each 90–100 µl AE Buffer. Six nuclear microsatellite markers (Schmid et al. 2016) were PCR-amplified with a Veriti 96 Well Thermal Cycler (Applied Biosystems, Forster City, USA). The PCR protocol varied slightly over years (optimized version: Supplementary Material Tables S1, S2). Electropherograms of PCR products were produced with an ABI 3130 Genetic Analyzer (Applied Biosystems) and the six markers were analyzed using GeneMapper 5.0 (Applied Biosystems). Note that microsatellite markers are notoriously difficult to establish in butterflies (Schmid et al. 2016), which limited the number of loci considered in this study.

Of the 1660 sampled individuals, only two were excluded due to 50% missing data in the genotypes. Another 19 individuals were removed from the analysis because their genotypes were identical to another individual probably caused by sampling error or contamination during laboratory work. The final sample size for genetic analyses amounted to 1639 collected on 189 BDM plots, four of which were sampled twice.

Null alleles and linkage disequilibrium

To assess null alleles and linkage disequilibrium, the data set was further limited to locations where at least ten individuals were sampled. This resulted in a data set containing 1279 individuals from 81 sampling locations. To check whether null alleles were present, the frequency of null alleles was calculated in each of these 81 sampling locations for each marker with Genepop in R using the package genepop 1.1.3 (Rousset 2008). Additionally, we tested for deviations of observed allele frequencies per marker using the function null.all in the R package PopGenReport 3.0.7 (Adamack and Gruber 2014). We then also tested for linkage disequilibrium between markers in 81 sampling locations with Genepop in R (Rousset 2008).

Genetic structure and diversity

To analyse the spatial genetic structure across the complete set of 189 sampling locations, irrespective of local sample size, we used the Bayesian clustering algorithm implemented in STRUCTURE 2.3.4 (Pritchard et al. 2000) run on a computer cluster (CentOS7 Linux Ubuntu18.04). The location of samples was used as priors (LocPrior model according to Hubisz et al. 2009), together with the admixture setting and the correlated allele frequency model (Falush et al. 2003). Values of r, indicating the informativeness of the LocPrior model, were below 1 for all K values tested (except K = 1). This finding suggests that local ancestry differed among sampling locations, hence justifying the choice of this model. The predefined number of clusters (K) was set to 1–12, and each K was repeated 10 times with a burn-in of 105 and a repetition of 106. As one run at K = 5 extensively deviated from the other nine runs, we ran an additional run for K = 5 and added this run instead of the deviating run (see Reutimann et al. 2020). Results from STRUCTURE were processed in R with the package pophelper 2.2.9 (Francis 2017) to plot the likelihood of all runs for each K and to cluster the 10 runs. For further analyses, sampling locations in which at least 10 individuals were genotyped were associated to distinct clusters. For this, the result of clustering at K = 5 was used, and these 81 sampling locations were allocated to one of the five clusters according to the highest assignment probability (Supplementary Material Fig. S1; see Results).

To evaluate the genetic diversity of M. galathea across Switzerland, we applied a moving-window approach that allowed us to leverage locally small sample size and integrate estimates over larger areas (Bishop et al. 2023). To do so, samples within a distance of 10 km of a BDM plot were pooled, and for each such window with at least 10 individuals, we calculated allelic richness AR (El Mousadik and Petit 1996) with the R package hierfstat 0.04-22 (Goudet and Jombart 2015); we chose AR because it is more sensitive to genetic drift, resulting from restricted connectivity, than other estimators of genetic diversity like expected heterozygosity. A continuous surface of genetic diversity was then produced by interpolating the data points using empirical Bayesian kriging (empirical transformation and K-Bassel as semivariogram model type) in ArcMap 10.7 (Environmental Systems Research Institute; Supplementary Material Tables S3, S4). We then also wanted to know whether genetic diversity spatially changed over the five years of sampling with a coarser yearly sampling. We therefore applied the moving window approach to each sampling year with a radius of 20 km and calculated the average change rate for those sampling locations that appeared at least three times in a single-year calculation, before interpolating the proxy of genetic diversity changes over Switzerland.

Genetic differentiation and molecular variance

In a molecular analysis of variance (AMOVA), we hierarchically partitioned total genetic variance (i) among/within the 81 sampling locations (n ≥ 10) and (ii) among/within genetic clusters grouped according to their assignment at K = 5 (see above); this analysis was done using the R package ade4 1.7–13 (Dray and Dufour 2007).

Paired values of genetic differentiation FST (Weir and Cockerham 1984) were calculated between the 81 sampling locations with at least 10 individuals as well as between sampling locations within the five genetic clusters identified by STRUCTURE (see Results) using the R package hierfstat (Goudet and Jombart 2015).

Isolation by distance and by altitude

To test whether isolation by distance (IBD) and/or by altitude (IBA) is found in M. galathea, we derived the Euclidean distance and cumulative elevational change, respectively, between all pairs among the 81 sampling locations (n ≥ 10). The cumulative elevational change was calculated along the straight lines connecting pairs of sampling locations using a Digital Elevation Model (DEM) with a resolution of 25 m x 25 m EU-DEM© (European Union 2019). Note that IBA refers to purely distance-related effects in that the elevational change is added to the straight-line distance between a pair of locations. As such, this concept does not preclude any adaptive effect related to altitude (cf. Orsini et al. 2013).

We tested whether Euclidean distance and altitude-related distance affected gene flow differently at varying spatial extents (Angelone et al. 2011), i.e. (i) between all 81 sampling locations (n ≥ 10) and (ii) for locations within the five genetic clusters as identified by STRUCTURE (Supplementary Material Fig. S1). For the first analysis, besides an overall test, we arbitrarily selected four geographic distance classes (6–50 km, > 50–100 km, > 100–150 km and > 150–305 km) to test IBD and IBA at varying distance ranges. This should allow us to evaluate changes in the explanatory power and the slope of the regression lines, indicative of alternative cases of IBD (or IBA) sensu Hutchison and Templeton (1999). The sampling locations which appeared in only one pairwise comparison in a subset were removed from the corresponding distance class to ensure that the covariance matrix was symmetric. For the second analysis, we tested for IBD and IBA within those genetic clusters derived by STRUCTURE at K = 5 in which more than 30 pairwise observations were available (Ticino/Southern Grisons, Northern Grisons, Western Central Plateau, Eastern Central Plateau, and Western/Eastern Central Plateau together).

To quantify effects of IBD and IBA, we regressed genetic differentiation FST against Euclidean distance and cumulative elevational difference using linear random effect regression models in the R package lme4 1.1–21 (Bates et al. 2015). As random effect, a covariance structure was incorporated due to the non-independence of data points (multiple usage of sampling locations when calculating distances between them), following the maximum likelihood population-effects (MLPE) model approach (Clarke et al. 2002) and implemented in R (van Strien et al. 2012). The predictor variables Euclidean distance and cumulative elevational difference were standardized by subtracting the mean of the variable to remove the correlation between the intercept and fixed-term coefficients (Clarke et al. 2002). Also, genetic distances were arcsine square root-transformed to better meet linear model assumptions (normal distribution of residuals). We calculated p values with the function ANOVA in the R package car 3.0–3 (Fox and Weisberg 2019) using Kenward-Roger approximation. As measure of model fit, R2β values were computed, which is a parameter standardized for the number of parameters used in a model and shown to be more suitable than the Akaike information criterion when models are fitted with the restricted maximum likelihood (REML) method (Edwards et al. 2008; van Strien et al. 2012). The contribution of variables was assessed by calculating partial R2β (Edwards et al. 2008).

Results

Genetic markers

The microsatellite markers were highly variable, with 17–51 alleles per locus. Notably, the compound microsatellite motives resulted in many alleles that differed by 1 bp only, irrespective of the 2 bp- or 3 bp-repeats (Schmid et al. 2016). These authors previously showed for a subset of the study locations that these loci did not indicate null alleles, whereas we detected a trend towards low frequencies of null alleles in the global dataset (Supplementary Material Fig. S2), with 95% confidence intervals not including zero (data not shown). However, estimated null allele frequencies > 0.1 per location at a given marker were rather evenly spread (data not shown), which suggests that estimates of genetic diversity and differentiation are not systematically biased. Moreover, we found no deviations from linkage equilibrium (Supplementary Material Fig. S3); thus, we retained all six genotyped markers for further analyses.

Genetic structure, differentiation, and diversity

The spatial genetic structure of M. galathea in Switzerland is best described by grouping populations into K = 5 genetic clusters, and cluster assignment of sampling locations were spatially aggregated (Fig. 2). While K = 7 had the highest likelihood and still a small variance among replicated runs (Supplementary Material Fig. S4, S5), admixture increased from K = 5 to K = 6 and K = 7 (Supplementary Material Fig. S4), while retaining the large-scale arrangement of the main clusters. Therefore, we considered K = 5 for displaying the spatial genetic structure of M. galathea in Switzerland (cf. Janes et al. 2017) and used this grouping for further analyses.

Fig. 2
figure 2

Spatial genetic structure of Melanargia galathea. Pie charts indicate the population-level assignment probability for each sampling location belonging to one of K = 5 genetic clusters. Pie charts are scaled according to the sample size (n = 1–32), cluster names are indicated as used in the text. Individual assignment probabilities are shown in Fig. S5

The five geographically structured clusters (Fig. 2) can be described, according to the Swiss biogeographic (sub)regions (Fig. 1), as (i) Western Central Plateau and (ii) Eastern Central Plateau, Jura Mountains and the Northern Alps, (iii) the Valais (western Inner Alps), (iv) Ticino/Southern Grisons (Southern Alps) and (v) Northern Grisons (eastern Inner Alps). Based on the STRUCTURE results of K = 5, we associated each sampling location with n ≥ 10 to one of the five genetic clusters according to the highest assignment probability. An AMOVA indicated that 8.24% of the total genetic variance could be found between the five STRUCTURE clusters (p < 0.001, \({\phi }_{CT}\)=0.082), 3.86% among sampling locations within clusters (p<0.001, \({\phi }_{SC}\)=0.042), and 87.90% within sampling locations (p < 0.001). Overall genetic differentiation thus was \({\phi }_{ST}\)=0.121 when sampling locations were grouped into clusters, but only 0.102 when ignoring this hierarchical structuring.

Genetic differentiation (FST) between the five derived clusters showed that sampling locations geographically closer to each other were generally less differentiated (Table 1). Low FST values were found between the Eastern and Western Central Plateau (FST=0.02) and between Northern Grisons and Eastern Central Plateau (FST=0.034). Substantially higher genetic differentiation was detected between Northern Grisons and Valais (FST=0.117) as well as between Ticino/Southern Grisons and Northern Grisons (FST=0.115).

Table 1 Pairwise genetic differentiation (FST) between genetic clusters of Melanargia galathea across Switzerland. Cluster assignment of sampling locations is shown in Supplementary Material Fig. S1

Genetic diversity of M. galathea, expressed as allelic richness AR, was higher in the South of Switzerland than in the Central Plateau, the two biogeographic regions that are separated by the Alps (Fig. 3A). While the Eastern Central Plateau and Northern Prealps displayed low levels of AR, with slightly higher values in the Western compared to the Eastern part of Switzerland, highest allelic richness was found in Ticino/Southern Grisons and in Valais. The overall change rate across the five years of sampling, referencing to the sampling locations using a moving window approach, indicated that genetic diversity remained similar (Fig. 3B), suggesting representative values over the five sampling years.

Fig. 3
figure 3

Interpolated average genetic diversity (A) and genetic diversity change rate per year (B) for Melanargia galathea in Switzerland between 2013 and 2017. Points represent sampling locations of the Biodiversity Monitoring of Switzerland for which aggregated values were obtained. Blue lines and areas represent major waterways

Isolation by distance and isolation by altitude

Overall, genetic differentiation increased with increasing geographic distance and altitude between pairs of populations (Fig. 4). We detected a significant positive correlation between genetic differentiation and both Euclidean distance (IBD) and cumulative elevational difference (IBA) between all pairwise comparisons of sampling sites with n ≥ 10; this holds for the overall analysis as well as when testing separately within four distinct distance classes (Table 2). IBD had a slightly higher support than IBA for the overall analysis according to partial R2β, whereas within each distance class, cumulative elevational difference explained genetic differentiation better (higher partial R2β values, Table 2) than Euclidean distance. We observed a slight change in regression slope from the shortest (up to 50 km) to the larger distance classes. This difference indicates that IBD and, to a lesser degree, IBA were driven by gene flow over short distances, whereas genetic drift had increasing effects at larger spatial extent.

Fig. 4
figure 4

Isolation by distance (IBD; top) and by altitude (IBA; bottom) calculated on all pairwise genetic (FST) and geographic distances (IBD: Euclidean distance; IBA: cumulative elevational difference between sampling locations). Regression slopes are shown for the entire data set and separately for different distance classes. Solid lines: regression slopes; dashed lines: 95% confidence intervals. Levels of significance are indicated by asterisks in the same color as the regression lines; *** = p < 0.001

Table 2 Isolation by distance (IBD, Euclidean distance) and isolation by altitude (IBA, cumulative elevational difference) of Melanargia galathea, overall and within four distance classes (n indicating the number of location pairs). R2β values indicate the model fit. In parentheses, the partial R2β for Euclidean distance and cumulative elevational difference are given. Significance level of slope coefficients: ***p < 0.001

Correlation of genetic and geographic distances diminished when tested at the regional level. Within the five clusters identified by STRUCTURE, Euclidean distance best explained the genetic pattern in the Central Plateau (R2β=0.309) and the Ticino/Southern Grisons (R2β=0.494; Table 3), whereas genetic differentiation in the Western and Eastern Central Plateau as well as Northern Grisons was unaffected by geographic distance (Table 3). Partial R2β values were significant for Euclidean distance in all clusters except Northern Grisons, whereas only the combined clusters of the Central Plateau showed a significant altitudinal effect on genetic differentiation.

Table 3 Isolation by distance (IBD, Euclidean distance) and isolation by altitude (IBA, cumulative elevational difference) within four of the five genetic clusters of Melanargia galathea derived by STRUCTURE results (n indicating the number of location pairs; excluding Valais with < 30 plots, and also combining the two clusters of the Central Plateau). “Central Plateau” refers to pooled samples of Eastern and Western Central Plateau. R2β values indicate model fit. In parentheses, the partial R2β for Euclidean distance and cumulative elevational difference are given. Significance levels of slope coefficients: **p < 0.01, ***p < 0.001; ns = not significant

Discussion

Among central European habitats, semi-natural grasslands are hotspots of biodiversity (Moeslund et al. 2013), but they have been declining in total area and become increasingly fragmented as a consequence of human land use (Seibold et al. 2019). Habitat fragmentation limits movement success (Fahrig 2017; Fahrig et al. 2019) and reduces gene flow (Burkart et al. 2016; but see Luqman et al. 2018), which eventually may have negative consequences particularly for populations that are continuously declining in size. We investigated patterns of genetic structure, differentiation, and diversity of the widespread butterfly species Melanargia galathea in Switzerland to infer if habitat loss and fragmentation in a strongly human-dominated landscape may have influenced the distribution of the species’ genetic variation over the course of five years. The overall genetic structure of M. galathea was best explained by five clusters, which in part reflect the well-established biogeographic regionalization in Switzerland. Genetic diversity, measured as rarefied allelic richness, was clearly highest in the South of Switzerland, and it fluctuated moderately within the sampling period between 2013 and 2017. Genetic differentiation among sampling sites and among genetic clusters indicated that historical gene flow was generally low, particularly in the Swiss Plateau and less so within mountainous regions (Valais, Ticino/South Grisons, North Grisons). We found highly significant isolation by distance (IBD) and by altitude (IBA) across the entire study range and within all distance classes tested, whereas IBA was weaker or absent within the five genetic clusters identified. These results suggest that the main driver of the observed spatial distribution of genetic diversity is historical gene flow, whereas our sampling scheme was not able to pinpoint effects of anthropogenic habitat fragmentation of the past century. Nevertheless, the pronounced genetic structure should refer to distinct conservation units that deserve respective consideration.

Genetic diversity

The pattern of genetic diversity, with the highest values of rarefied allelic richness in the South of Switzerland, might be explained by the two following reasons. The first explanation refers to the recolonization process after glaciation, as genetic diversity, and genetic structure in general, is often the result of a mixture between historic and recent microevolutionary processes (Epps and Keyghobadi 2015). Hence, the pattern of genetic diversity might represent the imprint of recolonization processes after the end of the last glaciation. During the last glaciation period, different Mediterranean refugial populations of many species existed and retained genetic diversity. In the course of recolonization, alleles were generally lost as only a restricted number of individuals was involved in the colonization of new habitats (Widmer and Lexer 2001). Melanargia galathea likely recolonized Western Europe from Italy and the Balkan region (Habel et al. 2005), but Habel et al. (2005, 2011b) suggested that Switzerland was only colonized by the Italian refugial lineage. Thus, the lower level of genetic diversity of M. galathea in the northern and eastern part of Switzerland compared to that in the South might represent founder effects when recolonizing Switzerland from southern refugia. A second explanation may refer to larger and better-connected populations in the South. Such populations often show higher levels of genetic diversity (Jacquemyn et al. 2010). Nevertheless, populations in the Central Plateau, which formed a gradient of assignment to two genetic clusters (Fig. 2) displayed relatively low levels of genetic diversity. Though one might expect elevated diversity estimates because of admixture between two distinct genetic lineages (e.g. Havrdová et al. 2015), we anticipate that these two clusters rather established as a consequence of wide-ranging dispersal and isolation by distance over time (see below). Accordingly, populations with rather even assignment probabilities to either of the two dominant clusters in this biogeographic region do not show increased genetic diversity compared to those with dominant cluster assignments.

At the same time, the average change rate of genetic diversity remained relatively stable between 2013 and 2017. It could either be that genetic diversity did not change recently or, more likely, the five-year time frame was too short to detect any change in genetic diversity (Leigh et al. 2019). Moreover, also sampling effects could account for the minor differences observed because we sampled different locations in consecutive years. Accordingly, our moving-window approach only estimates genetic diversity for a given plot on the basis of (sampled) surrounding locations. Re-visitation of the locations for direct comparison after five years (the phasing of the BDM sampling scheme) may thus potentially reveal location-specific differences over time. Therefore, it will be important to monitor the changes over extended time periods to better evaluate temporal trends in allelic richness that may result from decreasing habitat area and increasing fragmentation. Even longer time intervals between sampling may show only moderate changes in genetic diversity, as demonstrated for the endangered butterfly Lycaena helle in western European mountain ranges revisiting the same populations after 15 years (Habel et al. 2011a). Nevertheless, we consider the moving-window approach implemented here as a useful method for this purpose, as it can provide robust estimations of genetic diversity by incorporating also sampling locations with only few samples. While we acknowledge that certain border effects and yet low numbers of achieved calculations of genetic diversity in some regions (e.g., southwest of Switzerland) might bias interpolation schemes, our approach presents a way how the overall pattern of genetic diversity and respective changes, and not of single sampling locations, could be monitored in the future.

Spatial genetic structure, isolation by distance and isolation by altitude

The most meaningful number of genetic clusters was five, geographically structured according to biogeographic regions in Switzerland (Fig. 2). Though maximum likelihood was reached at K = 7 (Fig. S5), these additional clusters only increased levels of admixture, primarily so in the Central Plateau, which cannot be biologically explained. However, admixture levels were generally high irrespective of the number of clusters chosen, indicating substantial historical gene flow.

At K = 5, the two clusters found along the Central Plateau showed a gradient of assignment probabilities, and genetic differentiation between these two clusters was low in comparison to that of other cluster pairs (Table 1). This finding implies that these clusters form one genetic lineage that is in the course of gradual divergence due to increasingly restricted gene flow and the continuous effects of genetic drift. The remaining clusters in the eastern (Northern Grisons), south-eastern (Ticino/Southern Grisons) and southwestern (Valais) parts of our study area were likely delineated by the presence of the Alps, which reach altitudes higher than the upper distribution range of M. galathea of about 2500 m a.s.l. We conclude this from the fact that the cumulative elevational difference between sampling locations, that is IBA, significantly correlated with genetic differentiation. In particular, IBA was stronger than Euclidean distance (IBD) over the two lower distance classes (up to 100 km), which reflects barrier effects to gene flow through high-elevation mountains between regional occurrences and referring to the biogeographical regions in Switzerland (Fig. 1). Along this line, IBA seems to be more important in between-cluster genetic differentiation than within clusters (Tables 2 and 3), supporting our assumption that gene flow was primarily restricted by topographic features than, for example, because of fragmented habitat. Nevertheless, it remains unresolved whether topography alone has created and/or maintained the clustering pattern observed. The different Mediterranean refugial lineages of several species, which existed during the last glaciation period, genetically differentiated over time and can still be seen as a legacy of historical migration (Taberlet et al. 1998). Similar patterns may also be found in other butterfly species and should be considered in respective conservation strategies (Taberlet et al. 1998). When recolonizing central Europe, such lineages came into contact again and in some cases are still distinct to date (Hewitt 2000), while other lineages remained as or evolved into distinct species, as is the case in the genus Melanargia (Habel et al. 2008). As M. galathea presumably recolonized Western Europe from Italy and another lineage came from the Balkan region (Habel et al. 2005), the clusters of M. galathea found in Switzerland could be the result of secondary contact of refugial lineages that were maintained by the Alps as a barrier to gene flow. This scenario might explain why a high genetic differentiation between the Northern Grisons and Ticino/Southern Grisons clusters was found (Table 1). However, since Habel et al. (2005, 2011b) suggested that Switzerland was only colonized by the Italian refugial lineage, such a colonization history would require that other parts of Switzerland were recolonized from Ticino across the Alps. Therefore, patterns of genetic differentiation and loss of genetic diversity could be explained by the effects of genetic drift due to founder events (Widmer and Lexer 2001). Hence, populations in other parts of Switzerland might have differentiated from the first colonizing populations arriving in what is now the Ticino/Southern Grisons cluster, and the Alps maintained the observed clustering pattern. Nonetheless, the Ticino/Southern Grisons cluster is genetically more differentiated from the Northern Grisons cluster than from the Eastern Central Plateau cluster, which contradicts this scenario. Alternatively, westward immigration to Northern Grisons from a Balkan refugium could explain this finding. To clarify the migration routes of M. galathea into the range of Switzerland, studying M. galathea samples from neighboring countries with our microsatellite markers could be informative, as Habel et al. (2005, 2011b) did not include any samples from Switzerland.

As the number of genetic clusters can be biased by IBD, IBD can in return be biased due to the presence of a hierarchical structure of populations (Meirmans 2012). For example, close-by populations belonging to different genetic clusters may show high genetic differentiation despite short geographic distance. This might lead to a high variance in an IBD model. In our study, geographical distance in the smallest distance class up to 50 km showed the highest explanatory power (Table 2), indicating that IBD was mainly driven by gene flow up to about 50 km. In turn, we only found a weak signal of IBD at larger distances with similar slopes over the entire range of distances classes, suggesting that genetic drift became more prevalent over larger spatial extent. Such a pattern of IBD relates to case I of Hutchison and Templeton (1999), which applies to studies over large areas and distance-related relative contributions of gene flow and genetic drift to levels of population differentiation. However, sampling locations belonging to different clusters, hence elevated genetic differentiation, but within proximity might have biased this analysis. Therefore, we also tested for IBD within genetic clusters to find that IBD was significant in all clusters but Northern Grisons. This result substantiates that primarily at short distances, effects of gene flow within genetic clusters dominate over genetic drift at large spatial extent.

Low genetic differentiation: no effect of habitat loss and fragmentation?

Genetic differentiation between sampling locations and clusters was relatively low in the Central Plateau. Low genetic differentiation measures in M. galathea were also obtained by Vandewoestijne et al. (2004), covering a maximum distance of approximately 100 km, and by Habel et al. (2010) over an area with approximately 150 km between populations, using allozyme markers. Capture–mark–recapture studies have revealed that most individuals of M. galathea stay within the same grassland patch but show a high within-patch movement (Baguette et al. 2000; Habel et al. 2010). However, the few individuals that were found to disperse up to 2.4 km (Baguette et al. 2000) may prevent substantial genetic differentiation in the long term, even in landscapes with a high degree of habitat fragmentation. Melanargia galathea also occurs in secondary habitats such as road verges (Ebert & Rennwald 1991; Vandewoestijne et al. 2004), which might serve as alternative stepping stone patches and aid individual dispersal. Moreover, the relatively long flight season of six weeks could lead to high population densities, counteract population fluctuation and promote gene flow, as suggested by Habel et al. (2010). Due to these species-specific traits, it seems that sampling locations of M. galathea in Switzerland are well connected despite restricted habitat availability and fragmentation, with limited gene flow over large geographical distance and high altitudes.

Although it appears that sampling locations of M. galathea are well connected, the loss and fragmentation of habitat through land-use changes in Switzerland in the last century (Lachat et al. 2010) might have negatively affected M. galathea, but we were not able to detect respective effects with our study design over the course of five years. This outcome might have resulted because of (i) the time lag of genetic response to land-use changes due to large population sizes and (ii) FST as a measure of historical genetic differentiation used in this study, as we outline below.

First, time lags between the establishment of movement barriers, e.g., through increased habitat fragmentation and, thus, unsuitable landscape between habitats, may prevent drawing inferences on the effects of these barriers. For instance, Habel et al. (2015) analyzed the genetic structure of the Chalk-hill blue (Polyommatus coridon), a formerly widespread butterfly species that mostly occurs in nowadays fragmented calcareous grasslands, and found no effect of the recent loss and fragmentation of habitat on its genetic structure. These authors speculated that the observed genetic structure reflected that of formerly large and interconnected populations. How long the respective lag time is before the effects of fragmentation can be detected using molecular markers might depend on specific life-history traits of the study organism (e.g. population size, generation time, dispersal distance; reviewed in Epps and Keyghobadi 2015). A high effective and census population size, for example, reduces the effect of genetic drift, and therefore slows down genetic differentiation and increases the time lag between the onset of a barrier and notable effects on genetic differentiation (Luqman et al. 2018). Here, time series of genetic data may help elucidate the relevance of historical and contemporary population sizes and their effects on evolutionary processes (Gompert et al. 2021). Because M. galathea is still a locally common species with a wide distribution and reasonably high population sizes (Birrer et al. 2019), it might be that the effects of land-use changes over the last 100 years are not detectable yet, as it was also likely the case for P. coridon.

Second, and along the same line as the point raised above, estimating genetic differentiation among populations using FST reflects historical gene flow. Therefore, patterns of genetic differentiation are likely to be insensitive to recent changes in landscape composition and configuration. To substantiate this interpretation, analyses of contemporary gene flow might be informative (Angelone and Holderegger 2009). Alternatively, estimates of genetic diversity instead may be more sensitive to such short-term changes, but our five years of sampling still seem insufficient. Furthermore, we were forced to interpolate estimates of genetic diversity per location using a moving-window approach, also because of low local sample numbers. This methodological way out contributed to limited resolution of fine-scale patterns that could be related to local or regional changes in habitat availability. In the future, repeated sampling in the same locations for pairwise comparison of diversity estimates could better resolve such a trend in genetic diversity.

Conclusions

In summary, our sampling proved useful for crystallizing large-scale patterns of genetic diversity and differentiation, which have been largely governed by historical processes. Over the course of the past century, only a small proportion of the grassland habitat of M. galathea has remained intact, and the quantity and quality of dry meadows and pastures still decreases. While we could not find a negative trend in genetic diversity of M. galathea in Switzerland over the study period of five years, we cannot exclude that the species will experience negative effects of the declining and increasingly fragmented habitat on genetic diversity in the forthcoming years. Hence, we consider this situation as an extinction debt at the genetic level. The concept of extinction debt was originally proposed to reflect a situation of reduced habitat still retaining a level of species richness that is beyond expectation, while species would later go extinct even though no further land-use changes occurred (Kuussaari et al. 2009). In analogy, extinction debt on a genetic level would mean that not the species extinction but the genetic response, that is a decrease in genetic diversity, lags the trend in decreasing habitat availability and connectivity. Such a situation has been described for grassland plant species (Münzbergová et al. 2013; Aavik et al. 2019) and a butterfly species (Habel et al. 2015) in a fragmented habitat. Facing the risk of a potential genetic extinction debt, it will be important to further protect remaining habitat patches in Switzerland, if possible, to restore the quality of patches to grant potential stepping-stone habitats facilitating dispersal, and to monitor future changes of genetic diversity and differentiation of M. galathea in Switzerland. These measures should help maintain both the species and its population sizes, while in parallel conserve its genetic diversity that, in the long run, serves as the basis for adaptation under changing environmental conditions. Current developments such as initiatives for establishing green infrastructure (Snäll et al. 2016; Bolliger and Silbernagel 2020; Wang et al. 2021) offer promising avenues to mitigate gene flow across human-dominated landscapes. Notably, dispersal distances may also increase in response to both habitat fragmentation and climate change: Butterflies may be forced to fly longer distances owing to lack of nearby suitable habitat, and warmer, drier weather could promote such long-distance dispersal.