Introduction

Knowledge on the biogeography of European taxa is the most complete and comprehensive thanks to numerous phylogeographic research on various species1,2. It is well known how Mediterranean, temperate and boreal taxa responded to the Pleistocene glacial periods, as well as current constraints for European taxa distribution and diversity3. There are several paradigms being well supported by multiple sources of data, which describe refugia identified mostly in the south of the continent, but also local (cryptic) refugia that played a role during various periods for particular taxa being associated with some environments (like forests, steppes, marshlands, etc.)4,5. However, some taxa could not be easily assigned to these paradigms, due to their extrazonal distribution. Species inhabiting mountain areas belong to such a non-standard taxa, whose distribution is island-like with more or less isolated populations in mountain ranges. Many mountain species are related to either boreal or arctic populations. Such species were widespread during glacial periods, being currently restricted to warm-stage refugia at high altitudes or latitudes2. Consequently, such a species usually consists of many phylogenetic lineages of divergence, justifying their treatment as evolutionary units or independent taxa. Other species of extraordinary phylogeographic patterns are those inhabiting linear habitats, e.g., along watercourses. River networks often cross various climatic zones but are isolated by watersheds, which greatly affect the phylogeography of taxa occupying running waters, river channels or floodplains6,7. Moreover, the movement of individuals along watercourses often depends on the water flow, which is unidirectional, and many such species could easily disperse downstream but not hardly upstream8. This has consequences for their distribution, diversity and dynamics9. Probably among the poorest known phylogeography are organisms inhabiting montane river networks, due to their restricted ranges to rivers crossing mountains at selected altitudes10. Therefore, it could be expected that such a species should be restricted to only selected watercourses isolated by mountain ranges and strong unidirectional flow11. This would imply the existence of many phylogenetic lineages and a highly limited gene flow. On the other hand, it could be expected that the high dynamics of montane rivers (inundations, floods) had to force some evolutionary adaptations to such an unpredictable environment12. Consequently, species living along montane watercourses should exist in meta-populations, which imply some level of migration enabling re-colonization of areas being inundated13. It is possible that both patterns are not mutually exclusive and some gene flow exists but could be rather restricted within river basins, while not so between watercourses isolated by geographic barriers. Of course, distribution and diversity is different for freshwater taxa (living only in running waters), riverine species (inhabiting river channels), or riparian organisms (associated with floodplains). Moreover, some taxa are dependent on running water their whole life, whereas others only in immature stages, and still others are distributed in the surroundings of watercourses. That different habitat requirements must have a great impact on biogeography.

Current knowledge on the biogeography of river, riverine or riparian organisms in mountain areas (considering Europe only) is incomplete; it is mostly limited only to selected species and focused on particular areas. The best-known groups are freshwater animals, living their whole lifecycles inside rivers, like fishes6,14 and crustaceans7. Exemplary studies on insects in the Carpathians are only available for riffle beetles (Elmidae)15. Studies on riverine species by means of taxa spending part of their life in water (usually immature stages) and next utilizing surrounding habitats are also infrequent for mountains. Studies on salamanders16, Trichoptera17, Diptera18,19, and the beetle Carabus variolosus F.20, could be assigned to this type. In particular, riparian taxa meaning those that live along watercourses but are not directly dependent on freshwaters. Research on amphibians21 and a study on the beetle Liparus glabrirostris could be listed here22.

There are some biogeographic patterns that are common for species living along montane watercourses. When restricting this issue to Central European mountain systems, the following regularities arise. Many species living in or along watercourses survived the Pleistocene in local glacial refugia like the southern slopes of the Alps, Dinaric Mts., the Carpathians (e.g.,14,15,22). Some taxa have mixed ancestry, originating from Mediterranean mountains and local refugia, and the pathways of their expansion are complex7,17. This leads, in some cases, to the formation of hybrid zones across mountain ranges20,21. Genetic diversity and spatial structure of populations of riverine or riparian species in mountains reflects their history and contemporary gene flow. For many taxa, distinct evolutionary units were reported from particular mountain ranges, some of which occurred to be of taxonomic values7,19. There are also signs of dispersal being restricted by barriers (more pronounced for freshwater than riparian taxa)6.

The Carpathians are one of the largest mountain systems on the European mainland23, which is known as an important biodiversity hotspot24, where numerous evolutionary processes are at play25,26. This mountain system is also important due to the naturalness of various habitats27. Also, river networks in the Carpathians are of relatively high quality, at least compared to many rivers from the lowlands being heavy transformed. The Carpathians are crossed by numerous rivers belonging to either the Black Sea basin or to the Baltic Sea basin28. The connectivity of rivers within the basins is also complex due to numerous watersheds constituting barriers, especially as the Carpathian arch is nearly circular and rivers in inner areas (adjacent to the Pannonian Basin) are isolated by high mountains from outer areas, even if these rivers finally meet the sea. The Carpathians are also an interesting area for studying the biogeography of riverine species, as there is great diversity of rivers flowing at various altitudes and being fed mostly by rainfall, which often cause inundations and occasional floods29.

Among the riverine predacious beetles (RPB), the most important ecological groups are ground beetles (Carabidae) and rove beetles (Staphylinidae). Some species belonging to these families are known to be strictly associated with sand, gravel or cobblestone alluvium, however they do not live in the water30. These species prefer the initial conditions of river channels, with scattered pioneer vegetation and many potential prey, such as eggs of insects and other invertebrates, fly larvae, mites or numerous Apterygota, as well as small adult insects31. Such habitat is described as “alpine rivers and the herbaceous vegetation along their banks,” being protected under the EU habitat directive (Habitat Code: 3220). Because of their narrow environmental requirements, large species diversity, numerous populations and relatively easy methods of collection in the field, these beetles have been designated as indicators for river channel quality32,33,34. Many studies utilize RPB, mostly Bembidion carabids35, but also other ground and rove beetles36 for the assessment of river channel naturalness or the impact of man-made alterations (like damming or channelization). Knowledge on the details of their biology and ecology is available only for some groups and population dynamics in most species are poorly understood, whereas many aspects of population genetics and phylogeography are almost completely unknown37,38. Regarding genetic data, only sequences of barcodes are available for some ground and rove beetles (e.g. a barcode library for Bembidion species39). Mitochondrial markers were also available for some taxa being the subject of phylogenetic studies, however mostly in deep phylogenies of beetles up to the level of families37. To our knowledge, there is no study aiming to understand the past and present distribution and diversity of riverine ground or rove beetles using molecular tools.

Filling the gap in the knowledge about the genetic diversity of RPB can be beneficiary for both basic and applied science. Basic because ground and rove beetles are important for understanding the biogeography of riverine species associated with mountain areas as they are top predators in invertebrate communities38,40 and applied because genetic data on the populations of these beetles should be implemented in their use as indicators of river channel quality. It is unknown which species have greater or lower genetic diversity and how the connectivity of their population functions. This could have consequences for their use as indicators.

Here we used several species of ground and rove beetles as objects of phylogeographic studies on species living along (sub)montane watercourses in the Carpathians – four species of Bembidion: B. decorum (Panzer, 1799) (hereafter Bdec); B. varicolor (Fabricius, 1803) (hereafter Bvar); B. modestum (Fabricius, 1803) (hereafter Bmod); B. punctulatum (Drapiez, 1820) (hereafter Bpun), and three species of rove beetles: Paederus limnophilus (Erichson, 1840) (hereafter Plim); Paederidus rubrothoracicus (Goeze, 1777) (hereafter Prub); Paederidus ruficollis (Fabricius, 1781) (hereafter Pruf). Specifically, we aimed to describe the history of RPB, and current diversity of populations (intra- and inter-population genetic variability). This study aimed to verify the following hypotheses:

  1. 1)

    There is substantial congruence of phylogeographic patterns observed for RPB, indicating that they share a common history and that their ecological adaptations to the dynamic environment are similar.

  2. 2)

    Populations of RPB are genetically structured according to basins and being isolated by watersheds.

Results

Genetic diversity

After trimming low quality fragments, the lengths of Cox1 and ArgK sequences were 625 bp and 688 bp (Bmod), 637 bp and (Bpun), 636 bp and 674 bp (Bvar), 635 bp and 687 bp (Bdec), 577 bp and 685 bp (Plim), 638 bp and 690 bp (Pruf) and 568 bp and 695 bp (Prub). No indels or stop codons were detected in any sequence.

The overall genetic diversity of all examined beetle species was found to be high (e.g., haplotype diversity calculated for all samples (individuals from all sites) based on both markers is above 0.9 in all taxa) (Table 1). When analyzing the genetic metrics measured for particular regions of the Carpathians and particular river basins, the patterns occurred to be partially concordant among species. The highest values of haplotype and nucleotide diversities were found in the sites located in the Southern Carpathians and high values were also observed in sites from the Eastern Carpathians, as well in some sites from the Western Carpathians, but mostly from the inner (S) site of these mountains. Contrary to that, the lowest diversity metrics were observed in some sites on the outer (N) part of the Western Carpathians, some sites in the outer (E) part of the Eastern Carpathians, and in the Apuseni Mts., but only for some taxa (Table 1).

Table 1 Basic statistics based on molecular data (combined cytochrome oxidase subunit I and arginine kinase) calculated for examined predacious riverine beetles in the Carpathians.

Spatial genetics

Haplotype networks generated on two markers (Cox1 and ArgK) resulted in very complex patterns, with some haplotypes being common for more beetles, and this was more pronounced in the case of the Bembidion than the Paederus/Paederidus taxa (Figs. 1 and 2). Star-like phylogenies were observed mostly for ground beetles in single-marker networks, whereas spatial-genetic patterns for rove beetles were more complex, with many haplotypes found in a single or a few individuals. Despite the complexity of haplotype networks, some haplotypes were found to be specific for particular river basins or regions of the Carpathians, indicating some degree of spatial structuring (Figs. 3 and 4). Consistency between phylogeographic patterns observed for Cox1 and ArgK was limited, as only some populations occurred to be distinct with respect to both markers (Figs. 3 and 4). This was additionally confirmed by patterns of GST and FST indices among populations calculated for both markers separately.

Figure 1
figure 1

Haplotype networks constructed for cytochrome oxidase I gene (Cox1) and arginine kinase gene (ArgK) for populations of examined Bembidion beetles in the Carpathians. Colors correspond to defined river basins (for details see Table 1 and Figure 6).

Figure 2
figure 2

Haplotype networks constructed for cytochrome oxidase I gene (Cox1) and arginine kinase gene (ArgK) for populations of examined Paederus and Paederidus beetles in the Carpathians. Colors correspond to defined river basins (for details see Table 1 and Figure 6).

Figure 3
figure 3

Maps presenting the distribution of the most common haplotypes of two markers (Cox1 – cytochrome oxidase subunit I and ArgK – arginine kinase) for populations of examined Bembidion beetles in the Carpathians. Black represents all other remaining (less frequent) haplotypes. Maps created with use of QGIS ver. 3.28.9 (http://qgis.org) and CorelDraw ver. 18 (http://coreldraw.com).

Figure 4
figure 4

Maps presenting the distribution of the most common haplotypes of two markers (Cox1 – cytochrome oxidase subunit I and ArgK – arginine kinase) for populations of examined Paederus and Paederidus beetles in the Carpathians. Black represents all other remaining (less frequent) haplotypes. Maps created with use of QGIS ver. 3.28.9 (http://qgis.org)  and CorelDraw ver. 18 (http://coreldraw.com).

The heatmaps of FST and GST indices showed complex patterns of population differentiation and gene flow level (Fig. S1). Generally differentiation of populations of row beetles occurred to be lower than ground beetles. Moreover, values of FST and GST indices were larger for Cox1 than for ArgK markers. The highest genetic differences occurred between geographically most distant populations.

That limited spatial structuring was further confirmed by AMOVA and the Mantel test. Molecular variance measured between four major regions of the Carpathians (Western vs. Eastern vs. Southern vs. Apuseni Mts.) revealed a relatively low proportion of variance, which could be attributed among these regions (from only 6% in Bpun to 34% in Bmod; Table S1). These values were only slightly higher when dividing the population according to defined river basins (from 21% in Bvar to 50% in Plim; Table S1). The majority of molecular variance, in both ways of grouping, occurred to be within populations (from 27% in Bmod to 68% in Prub for regions and from 20% in Plim to 69% in Prub for basins; Table S1).

The Mantel test showed that IBD is significant but weak only for Bpun (R = 0.08; p = 0.046). For Bvar, IBD was also significant but negative indicating that distant populations are even slightly less distinct than adjacent populations (R = − 0.13; p = 0.006). For other species, IBD was insignificant: Bmod (R = − 0.11; p = 0.833), Bdec (R = 0.03; p = 0.335), Plim (R = − 0.03; p = 0.708), Pruf (R = − 0.00; p = 0.567), and Prub (R = − 0.14; p = 0.996) (Fig. S2).

Demography

Tajima’s D test was negative for all species but significant only in the case of Bpun and Plim (Table S2). On the other hand, Fu’s Fs test was also negative and significant for all species (Table S2). Consequently, both tests indicated population size expansion (e.g., after a bottleneck or a selective sweep), at least for some of the examined species.

MD occurred to be unimodal and left-skewed for Bpun, Bvar, Bdec and Pruf, whereas it was multimodal and more right-skewed for Bmod, particularly for Plim and Prub (Fig. 5). Estimates of demographic events suggested a consistent period of expansion times for four out of seven species (Bmod, Bvar, Bdec, Pruf) in a range between 12 and 9 Kya. For Bpun, these estimates were a little older (16–13 Kya), whereas for two species they were much older: Plim (27–22 Kya) and Prub (45–36 Kya).

Figure 5
figure 5

Visualization of demographic statistics measured for populations of examined predacious riverine beetles in the Carpathians. Left panel—histograms of mismatch distribution. Right panel—results of Bayesian skyline plot analyses.

BSP indicated that all examined species underwent changes in their effective population sizes (Fig. 5). Three species (Bmod, Bpun, Pruf) showed similar patterns of constant but slow growth in population size; two species (Bvar and Bdec) a more stepped growth of population sizes around 20 Kya (Bdec) or 10 Kya (Bvar). Prub also grew in population size but recently (0.3–0.2 Kya) its population collapsed in size. Finally, Plim showed a relatively stable trend with a very recent reduction in population size (Fig. 5).

Discussion

History

Demographic analyses on genetic data lead to a concordant picture of the past distribution of RPB in the Carpathians. Genetic data showed that expansion of the examined beetles is rather a case of recent times, with some exceptions. Demographic estimates pointed to some different recent histories of particular taxa. Most RPB appeared to increase in population size since end of the last glaciation, however some taxa (Bpun, Prub) probably started expansion earlier—during LGM. Results for Plim are inconsistent, as mismatch distribution suggest its earlier expansion, whereas the Bayesian skyline plot shows a relatively stable population size. Only for two taxa (Plim and Prub) are there signs of a very recent decline of population sizes, however, confidence intervals are rather wide; therefore, this finding needs to be taken with caution. It seems that the Carpathians were not an important refugium for RPB, contrary to some other species living in watercourses6,7,14,15. Cold-adapted freshwater taxa living in mountains possibly had more stable environment even during Pleistocene in rivers in the Carpathians, whereas species living on alluvium could be more susceptible to unfavorable climatic conditions in glacial periods.

Current diversity

The southern mountain ranges of the Carpathians harbors, on average, populations having highest values of diversity indices. This is probably an effect of their origin or rather the direction of expansion in the Carpathians from the south to the north during the Holocene period. This is confirmed by the lowest genetic diversity from the outer part of the Western Carpathians, settled being probably at the end of beetle spread in the Holocene period. The Southern Carpathians are known as an important local glacial refugium for temperate taxa in Europe1,2,3,4,5. The existence of most (genetically) diverse populations of RPB in this part of the Carpathian range reflects that common phylogeographic pattern, although rather recent estimates of expansion of these beetles in the Carpathians prevent from drawing conclusions about the role of the southern ranges as their glacial refugia. To solve this issue, further studies including populations from the Balkans, the Dinaric Mts., and the Alps are needed, as it is likely that RPB settled the Carpathians from external refugia. Interesting is that some populations in the Eastern and southern slopes of the Western Carpathians possess also high genetic diversity. This could be explained by the settlement of these areas by diverse populations or by beetles from different sources (various migration routes and/or waves). This issue could not be investigated based on selected markers, and genomic information should be implemented.

Highly complex patterns of haplotype networks, both generated from both mtDNA and nuclear genes, are interesting. This is contrary to freshwater invertebrates with known phylogeography in the Carpathians (e.g., gammarids)7,15 or riparian insects (e.g., Liparus glabrirostris)22. For these other animals associated with mountain watercourses, many phylogenetic lineages were determined across the Carpathians, being mostly geographic-specific, which indicate spatial structuring. Mitochondrial haplotype networks obtained for Bembidion beetles, but not for rove beetles, are quite similar to those observed in Elmidae15, for which common haplotypes were found in many sites, indicating limited spatial structuring. RPB seemed to not be clearly structured genetically over the Carpathians. Only a portion of molecular variance could be attributed between regions or basins. Only for two out of the seven taxa, a significant correlation between geographic and genetic distances was detected, however always being very weak. This is caused by many haplotypes found in single localities and some haplotypes being found in several individuals from distantly localized populations (possible signs of long distance dispersal). On the other hand, a mapping of more common haplotypes showed that some of them are specific to particular areas of the Carpathians, but they are rarely associated with river basins. In summary, these patterns generally reject the assumption that populations of RPB are genetically structured remaining isolated by barriers (watersheds on mountain ranges) and that beetles found in rivers belonging to the same basin are not (or are less) genetically isolated than beetles captured in different basins. It was suspected that RPB are poor dispersers due to their behavior during inundations—rove beetles escape on the ground (although are capable of flight), whereas ground beetles fly very short distances (authors’ observations). This assumption is likely wrong and these species are capable of long distance migration, possibly only during some phases of their lifecycle, e.g., emergence after wintering or during mating41. Unfortunately, knowledge on the biology of these species is very limited, with many details on the ecology and biology (e.g. movement, reproduction) remaining unknown42. High genetic diversity and complex phylogeographic patterns suggest that predacious riverine beetles exist in a system of meta-populations, with individuals moving between the occupied sites. It is most probable that some populations are vanishing during floods (individuals are either killed by the water or forced to escape)41. This could be compared to the genetic diversity of Elmidae15. Subsequently, empty sites are colonized by ground and rove beetle individuals from other areas (rivers). This would explain the missing clear spatial structure of their populations, as gene flow had to be substantial, albeit partially limited by distance. These are just possible explanations that need to be verified. Most likely there are some differences in responses of ground and rove beetles to the changeable environment, which resulted in more complex haplotype networks observed for Paederus/Paederidus than for Bembidion. Likely different mechanisms of isolation are responsible for that, especially as simple isolation by distance is generally absent in RPB, and other isolation models (by dispersal limitations, by adaptation) need to be verified43.To solve this issue examination of loci responsible for environmental adaptations is required44.

Implications

Ground and rove beetles, particularly taxa belonging to the examined genera, are known as excellent indicators of river channel quality32,33,34,36. However, their utility as indicators was based solely on their narrow habitat requirements33,34. Moreover, these species are used as indicators at the level of community. Such a basic or applied use of these beetles is done without knowledge on the details of the history and current diversity of particular species in the sampled area, which could have important consequences for their distribution, density or dynamics. This study brings some novel findings, which could be valuable for the use of predacious riverine beetles as indicators. First of all, it seems that RPB have many commonalities in their recent (Holocene) spread over the Carpathians, which proves that the history of particular taxa should not be issue in their use in community studies for monitoring or conservation purposes, as apparently, all these beetles experienced similar changes in distribution and abundance. Consequently, their present occurrence has to be mostly shaped by contemporary environmental constraints, rather than past history. Moreover, the majority of their populations across the Carpathians possessed high genetic variability and only some areas seemed to be settled by less genetically diverse populations. This information could also be important for comparing biodiversity data from various areas, as it is possible that populations having lower genetic diversity are more prone to being affected by inundations or man-made alterations of rivers. The open question is whether lower genetic diversity is an effect of origin of populations (historic expansion?) or it is a result of some external factors acting recently like river regulation and damming. This problem could be also solved with use of genomic data in conjunction with landscape characteristics (landscape genetics)45,46.

Conclusions

For the first time, a comprehensive elaboration of the phylogeography of RPB from a mountain range on the example of the Carpathians is presented. Molecular analyses for several species of RPB substantially broaden the knowledge on the biogeography of the Carpathians25,26 as far as information about species inhabiting river channels but not living in running waters like crustaceans7,15 or fishes6,14. Phylogeographic and demographic data revealed many common features of examined beetles being members of two unrelated groups, but sharing environment and belonging to the same trophic guild. Therefore, Hypothesis 1 was confirmed as there is substantial congruence of phylogeographic patterns observed for RPB, indicating that they share a common history and that their ecological adaptations to the dynamic environment are similar.

Higher genetic diversity was reported mostly from the Southern Carpathians, however many sites in the Eastern and inner Western Carpathians also harbor populations of high variability. Populations of these beetles are not clearly geographically structured. However, some common haplotypes occurred to be widespread in particular regions or basins of the Carpathians, indicating some degree of isolation. This is confirmed by weak isolation by distance reported only for some taxa. It seems that the examined beetles are more capable of greater migration than expected based on their limited flight activity. Therefore, Hypothesis 2 was rejected as populations of RPB are genetically structured according to basins and being isolated by watersheds.

The crucial discovery of this study is that species of RPB, regardless of their taxonomic affinity and phylogenetic relations, have many common features describing their phylogeography and demography.

Material and methods

Species characteristics and selection

Bembidion Latreille, 1802 is the genus which the highest species richness within whole Carabidae family. To date, more than 1200 species have been described47. In Palaearctic region occurring more than 900 species and subspecies, while from Europe so far discovered approximately 400 taxa48. Most species live along banks of running or standing waters, but also on open areas37.

Paederus Fabricius 1775 and Paederidus Mulsant & Rey, 1877 are members of the same tribe Paederini Fleming, 1821 (Blackwelder, 1939). Approximately 650 species of these genera occur in the world, mostly in subtropical and tropical areas49. Only some genera are well represented in Europe, very few in northern parts of the continent and/or preferring mountainous habitats. About five species of the genus Paederidus are currently known from Europe, while Paederus in this area has about 13 representatives. Paederus species preferring wet and humid habitats. They live on the edge of reservoirs and rivers, on mudflats, among sparse vegetation, only a few species reside in dry and warm environments. Paederidus is also most commonly found on the banks of rivers and streams, with a distinct preference for mountain and foothill sites.

Four species of Bembidion were selected for this study: B. decorum (Panzer, 1799) (hereafter Bdec); B. varicolor (Fabricius, 1803) (hereafter Bvar); B. modestum (Fabricius, 1803) (hereafter Bmod); B. punctulatum (Drapiez, 1820) (hereafter Bpun).

Three species of rove beetles (Staphylinidae) were selected for this study: Paederus limnophilus (Erichson, 1840) (hereafter Plim); Paederidus rubrothoracicus (Goeze, 1777) (hereafter Prub); Paederidus ruficollis (Fabricius, 1781) (hereafter Pruf).

All mentioned species from both families share the same ecological features. Adult and larval forms of all species live in the same environment and are predatory and simultaneously are not dependent on vegetation, which is highly variable and unstable in the environment of dynamic mountain rivers38,40). During the selection of species for the study, we were also guided by the following criteria: (i) all species with mountain-type distribution, known to occur throughout the Carpathian mountain system; (ii) habitat requirements of the species limited to gravel or cobblestone alluvium in (sub)montane river valleys; (iii) numerous populations over the Carpathians; (iv) numerous and rich populations, allowing to catch at least 5–10 specimens from as many species as possible per site. During field sampling (see below), dozens of species of ground and rove beetles were caught and preserved for molecular use. However, most of these taxa were found in only single or several localities from particular parts of the Carpathians, usually as a single individual per site. These species were discarded due to insufficient sampling. Others of a relatively large number of individuals collected occurred to be lowland species with ranges spanning into the Carpathians, and were also discarded.

Sampling

Beetles were sought and collected across the Carpathians between 2017 and 2021. Unfortunately, due to the Russian invasion of Ukraine, we had to abandon the plan for sampling beetles in the southern part of the Ukrainian Carpathians in 2022 year. That resulted in approx. 200 km gap in sampling design. Although samples already collected in Eastern Carpathians in Poland, Slovakia, Ukraine and Romania represent well this part of beetle ranges. Individuals were sampled from river alluvia using of exhauster. These beetles usually hide under cobblestones or inside gravel. To facilitate finding of individuals the water was flushed on the ground, what forced beetles to move – individuals run from the area being wet as the result of natural escape behavior42. Sampling was done during the highest abundance of predacious beetles since end of May to the beginning of July.

In total we sampled beetles for molecular use on 159 sites (CZ – 9, PL – 50, RO – 42, SK – 36, UA – 22) from 111 (CZ – 7, PL – 37, RO – 31, SK – 22, UA – 15) main rivers and their smaller but always named tributaries (Fig. 6). Particular species were selected from 89 sites (Bvar), 129 (Bdec), 109 (Bpun), 35 (Bmod), 109 (Prub), 82 (Pruf) and 88 (Plim) (Table 2).

Figure 6
figure 6

Localization of sampling sites of riverine predacious beetles over the Carpathian range. Each major tributary used in the assignment of sites for analyses is presented in a different colour. Map created with use of QGIS ver. 3.28.9 (http://qgis.org)  and CorelDraw ver. 18 (http://coreldraw.com).

Table 2 Sampling desing of predacious riverine beetles in the Carpathians for molecular analyses.

We used 757 individuals: 111 (Bvar), 126 (Bdec), 117 (Bpun), 72 (Bmod), 118 (Prub), 105 (Pruf), 108 (Plim), from 19, 31, 28, 32, 29, 27 and 30 sites, respectively.

Individuals were immediately preserved in 96% ethanol and further stored at -22ºC for molecular use. Before DNA extraction, each individual was determined to the species level.

Molecular analyses

Laboratory procedures

Whole beetle bodies were used for DNA extraction using a Nucleospin Tissue kit (Macherey–Nagel). Cox1 was amplified using primer pairs: B1490-Bcoi2R37, LCO1490-HCO219850 or Paed-F2-Paed-R251. Nuclear protein-coding gene – Arginine Kinase (ArgK) was amplified using primers AK168F and AK939R52. The reagent concentrations used for the amplifications and PCR cycling profiles of both markers were as in Kolasa et al.51. After purification, the PCR fragments were sequenced using a BigDye Terminator v.3.1. Cycle Sequencing Kit (Applied Biosystems) and run on an ABI 3100 Automated Capillary DNA Sequencer. Sequences (haplotype only) are deposited in GenBank under accession numbers provided in Appendix 1.

Species assignment confirmation

Prior to intraspecific analyses, all newly generated sequences were compared with available resources in GenBank using Basic Local Alignment Search Tool (https://blast.ncbi.nlm.nih.gov/)53. All sequences occurred to belong to the species assigned to the species based on their morphology (data not shown). Moreover, all newly generated sequences were aligned with selected sequences of other Bembidion or Paederus/Paederidus species, and maximum-likelihood trees were generated using IqTree server (http://iqtree.cibiv.univie.ac.at/)54. In all cases, sequences were grouped consistently according to the morphological identification of beetles (all sequences from particular species formed a monophyletic group) (data not shown).

Statistics

Sequences were aligned in MAFFT v. 755. Aligned sequences were trimmed and translated into protein sequences in MEGA11 to check against pseudogenes56. For some analyses, sequences were grouped according to their geographic provenance. Grouping was based on regions of the Carpathians (W. Carpathians vs. E. Carpathians vs. S. Carpathians vs. Apuseni Mts.) or according to river basins (Table 2).

Standard genetic indices for populations such as haplotype number (H), haplotype diversity (Hdiv), nucleotide diversity (πdiv), as well as inter-population indices like FST, GST and NST were computed using the program DnaSP v. 557, separately for both markers. The values of the latter indices were next shown in matrix heathmaps considering the geographic groups according to Table 2 and with use of Heatmapper (http://www.heatmapper.ca).

To check which portion of genetic variation was present between populations, an analysis of molecular variance (AMOVA) was conducted in ARLEQUIN v. 3.558.

An isolation by distance (IBD)59 was performed in ARLEQUIN v. 3.558, using pairwise FST values (FST / (1-FST)) and straight-line geographic distances in kilometers (log(km)).

Haplotype networks and maps

Neighbor-joining (NJ) haplotype networks60 were reconstructed separately for each marker in PopArt61, and the same was also done for the combined sequences. Distribution of haplotypes over the Carpathians (separately for each marker and species) was visualized using QGIS ver. 3.28.9 (http://qgis.org) and CorelDraw ver. 18 (http://coreldraw.com). All maps were created using QGIS based on elevation raster downloaded from the WorldClim database (http:/www.worldclim.org/data/worldclim21.html;62) and shapefile "Hydrography of Europe", downloaded from http://www.efrainmaps.es. Carlos Efraín Porto Tapiquén. Geografía, SIG y Cartografía Digital. Valencia, Spain, 2020. All source files used for visualization of data are freely available.

Demographic estimates

Demographic analyses were done solely on Cox1 due to lacking reliable estimates of mutation rates for the ArgK gene in beetles.

Two statistical tests Tajima63 D test and Fu64 Fs were used for verifying neutrality of examined sequences and to detect signs of past demographic changes in the examined populations.

A mismatch distribution (MD)65 was calculated in ARLEQUIN v. 3.5 only for Cox1 in order to examine the demographic history, and specifically, test for historical (temporal) expansions of populations of the species. The probable time of expansion (how long ago the expansion occurred) was estimated by the parameter τ. Due to lack of calibration events based on (sub)fossil materials for examined species, the mutation rate was estimated in range of 0.0158–0.0196 divergence lineages per million years according to Papadopoulou et al.66.

Additionally, a coalescent-based Bayesian skyline plot (BSP) was generated using BEAST v. 2.6.567. To investigate the posterior probability distribution of effective population size (Ne), the best-fit model of nucleotide substitutions and their parameter values as priors were estimated without the assumption of any particular demographic model68. The Cox1 and ArgK nucleotide substitution rates were set to the average value commonly found in beetles65 with a strict molecular clock. Markov chain Monte Carlo sampling was run for 10 million generations with parameters sampled for every 5.0 × 104 generation. The initial 10% of the run was discarded as burn-in. We determined the effective sample size for the posterior distribution of estimated parameter values using Tracer v. 1.669.