Introduction

The Western European hedgehog, Erinaceus europaeus L. (Erinaceidae: Erinaceinae), is naturally distributed in the Iberian Peninsula, western and central Europe, the UK, Ireland, Scandinavia and northern Russia (He et al. 2012). Western European hedgehogs are a nocturnal species inhabiting lowlands, deciduous woodlands and Mediterranean holm oak stands. They avoid dry regions but can be found in urban landscapes. Their distribution seems to be related to resource availability and the density of predators (Doncaster 1992; Micol et al. 1994; Young et al. 2006). The preference of hedgehogs for urban areas has been associated with the minor presence of badgers (Meles meles L.) and a major food availability in urban zones (Doncaster et al. 2001; Hof and Bright 2010; Pettett et al. 2017; De Poel et al. 2015). Morris (1988) concluded that hedgehogs usually do not move distances larger than 4 km, whereas Zingg (1994) found that some males can occasionally cover distances up to 7 km. Despite Reeve (1994) described juvenile dispersal, Rasmussen et al. (2019a) proved that in suburban areas hedgehogs have small home ranges mainly in their juvenile stage. Doncaster et al. (2001) indicated that hedgehogs do not have a clearly defined period of dispersion during their life history. These authors also stated that hedgehogs explore new territories and move from unfavourable to favourable locations, following variable routes with different lengths and directions, and reported dispersal movements up to 3.8 km. It seems that road verges could be used as dispersal corridors by hedgehogs, as has been described for other species of small mammals (Forman and Alexander 1998). Alternatively, roadways have also been reported to be significant barriers to hedgehog migration (Huijser and Bergers 2000; Orlowski and Nowak 2004).

Because gene flow among populations is expected to be correlated with the dispersion capabilities of their individuals (Allendorf 1983), knowledge of the possible genetic structure patterns can clarify the dispersion capabilities of hedgehogs. In this context, based on microsatellite genotyping, previous papers have assessed the connectivity of hedgehogs across highly fragmented habitats in the urban landscapes of Oxfordshire, UK (Becher and Griffiths 1998), Zurich, Switzerland (Braaker et al. 2017) and Berlin, Germany (Barthel et al. 2020). All these studies found high genetic diversity (HS = 0.6–0.7) and significant genetic differentiation among populations (FST = 0.06–0.19) explained by low rates of dispersal and landscape elements, such as rivers, highways or fences that hindered gene flow. In contrast, the recent study by Osaka et al. (2021) revealed low genetic diversity (HS = 0.39) and failed to detect population subdivision in urban hedgehogs around Helsinki. Interestingly, the study by Barthel et al. (2020) showed that the population structure disappeared when related individuals were excluded from the analysis. Microsatellite genotyping has also been used to study the biological invasion process of E. europaeus as an allochthonous species in New Zealand (Bolfíková et al. 2013) and Pianosa Island, Italy (Iannucci et al. 2019). In Denmark, using single nucleotide polymorphisms (SNPs) genotyping, Rasmussen et al. (2019b; 2020) found low genetic diversity values (HS = 0.13–0.32) and high population differentiation (FST = 0.03–0.32) across fragmented rural and urban landscapes, related with the isolated island structure of this country. Finally, other previous population genetic studies have focused on the contact zone of E. europaeus and E. roumanicus in Central Europe, where the pattern of population structure seems to be related to the postglacial colonization of the Iberian and Apennine phylogeographic lineages into this area (Bolfíková and Hulva 2012; Ploi et al. 2020; Zolotareva et al. 2021).

Other studies using molecular data have focused on the phylogeny and geographical distribution of E. europaeus evolutionary lineages, including none or a few specimens from the Iberian Peninsula (Santucci et al. 1998; Seddon et al. 2001; He et al. 2012; Bannikova et al. 2014). Recently, Sanz et al. (2021) studied the phylogeny of Iberian hedgehogs and found two western European mitochondrial lineages whose distribution was delimited by the Ebro River. However, no other studies exist regarding the population genetic or conservation status of hedgehog populations on the Iberian Peninsula, which represents the southern limit of the distribution of this species.

Declines in hedgehog densities have been reported in both rural and urban areas in Europe (Hof and Bright 2016; Williams et al. 2018; Taucher et al. 2020). The highest population decline has been documented in the rural areas of UK (Williams et al. 2018), where E. europaeus has been included as vulnerable in the Red List for Britains’ Mammals of 2020 (Mathews and Harrowers 2020). E. europaeus is listed in Appendix III of the Bern Convention and in the studied area (Spain) this species is protected by special conservation regulations of autonomic administrations (Catalonia, Valencia and Andalucia). However, E. europaeus is considered of least concern by the IUCN Red List of Threatened Species (IUCN 2021). The conservation of this species is also concerning in urban environments, which are considered to be critical areas to support global biodiversity (Aronson et al. 2017). The main important threats to hedgehog populations include fragmentation of their habitats due to human actions, presence of predators and road collisions (Huijser and Bergers 2000; Palomo et al. 2007; Hof and Bright 2009). The lack of connectivity among populations leads to their isolation, the loss of genetic diversity and, in the long term, their extinction (Frankham et al. 2010). Therefore, knowledge of the level and distribution of genetic diversity is necessary to determine the status of the remaining populations.

In this study, we aimed to estimate genetic variation and identify patterns of the population structure of E. europaeus in the north-eastern Iberian Peninsula. We also analysed some specimens from northwest Iberia for comparison. We asked if (i) the genetic diversity values were comparable between north-western and eastern populations, (ii) the genetic differences between these two major regions coincided with the phylogeographic distribution of lineages, and (iii) the hedgehogs of the studied regions retained genetic diversity and/or were genetically isolated. We paid particular attention to the Barcelona Zoo population, as it represents a vulnerable urban population with conservation priority. This information will permit us to clarify the connectivity of hedgehog populations in north-eastern Iberia, to know their conservation status, and to design conservation strategies for this species.

Material and methods

Samples

Ninety-two specimens of European hedgehogs, E. europaeus, from the northern region of the Iberian Peninsula (78 from the north-eastern region and 14 from the north-western region) were sampled from 2009 to 2015 (Fig. 1, Supporting Information, Table S1). This sampling included a natural population within Barcelona city, the members of which live freely within the zoo facilities, sampled in 2009. These hedgehogs can move freely in and out of the zoo, but this area represents an isolated green urban habitat in the city (Fig. 1). Hair follicles of the zoo animals and those from Park Agrari (Supporting Information, Table S1) were sampled during nocturnal sampling campaigns. The rest of the samples were obtained from individuals from animal rescue centres and from hedgehogs found dead along roads. We collected muscles from roadkill animals and from animals that died in rescue centres, and sampled hair follicles from live animals.

Fig. 1
figure 1

Map of sampling locations. Sample dots are coloured according to BAPS with rims referring to STRUCTURE clustering (black: Girona; green-grey: Central Catalonia; red: Zoo, see Fig. 2). Black solid lines represent populations defined for posterior analyses: Girona, Zoo and Central Catalonia (rest of samples). The grey solid line represents substructure within the Central Catalonia cluster identified by Geneland. Red dotted lines indicated principal routes (motorways). Black dotted lines represent “Massís de les Gavarres” and “Massís de Cadiretes” mountains. Map of the Barcelona city indicating the Zoo is also shown

Microsatellite genotyping

The total DNA was extracted from the muscle tissue using the Realpure Genomic DNA extraction toolkit (Durviz SL, Valencia, Spain) following the manufacturer’s instructions. For hair follicles, we added 1 M dithiothreitol (DTT) to proteinase K at the first step of the Durvitz protocol according to Köchl et al. (2005).

Eleven microsatellite loci, EEU1, EEU2, EEU3, EEU4, EEU5, EEU6 (Becher and Griffiths 1997), EEU12, EEU36, EEU37, EEU43 and EEU54 (Henderson et al. 2000), were amplified (Supporting Information, Table S2). The forward primers were end-labelled with fluorescent dye. The PCRs (20 μl) contained 2 μl DNA extraction, 2 μl Buffer (BIOLINE) 10 × , 0.1 μl of Taq DNA polymerase (BIOLINE) (5 u/μl), 0.5 μl forward primer (10 μM), 0.5 μl reverse primer (10 μM), 2 μl dNTP MIX (2 mM) and 0.6 μl MgCl2 (50 mM). The thermal cycling conditions consisted of an initial denaturation step at 94 °C for 5 min followed by 35 cycles of 94 °C for 30 s, 56–65 °C (Supporting Information, Table S2) for 1.5 min and 72 °C for 1.5 min, and a final step of 72 °C for 10 min. After amplification, the genotypes were visualized using an Applied Biosystem 3130 Genetic Analyser and interpreted visually with GeneMapper 4.0 software. To check for large allele dropouts and null alleles, the data were analysed using MICROCHECKER v 2.2.1 (Van Oosterhout et al. 2004) and FreeNA (Chapuis and Estoup 2007).

Data analysis

The minimum number of homogeneous units (K = 1–6) was estimated using the Bayesian Markov chain Monte Carlo approach method of STRUCTURE version 2.3.3 (Pritchard et al. 2000). Analyses were carried out with the admixture model and correlated allele frequencies without prior population information and with a burn-in period of 200,000 steps followed by 1,000,000 Monte Carlo replicates. Twenty independent runs were conducted for each K value tested. The optimal K value was selected following the recommendations of Pritchard et al. (2000) and according to the method by Evanno et al. (2005), implemented in STRUCTURE Harvester (Earl and vonHoldt 2012). In addition, the spatial Bayesian clustering methods implemented in BAPS v. 6.0 (Corander and Marttinen 2006) and GENELAND v.4.9.2 (Guillot et al. 2005) were used to identify spatially clustered individuals.

Because the above Bayesian methods are highly sensitive to uneven sample sizes among populations (Puechmaille 2016), we also used discriminant analysis of principal components (DAPC) (Jombart et al. 2010) to determine the number of genetic groups using the package Adegenet 2.1.3 (Jombart 2008) implemented in R 4.0.3. (R Core Team 2020). This method is free of classical assumptions on Hardy–Weinberg and linkage equilibrium and performs better than Bayesian methods in obtaining complex population structures (Jombart 2008). The a-score index was used to find the optimal number of principal components (PCs) that should be retained in the DAPC analysis to avoid overfitting of the model.

Finally, a Mantel test implemented in GENEALEX v 6.5 (Peakall and Smouse 2012) was used to test the correlations of the geographic and genetic distances (isolation by distance, IBD) in all the studied areas, and in the north-western and north-eastern regions individually, and the significance of the correlations was estimated by 999 random permutations.

Once homogeneous units were identified, genetic diversity parameters, number of alleles (A) and expected heterozygosity (Hs), were estimated for each cluster using the program FSTAT 2.9.3 (Goudet 2001). We used the software HR-RARE (Kalinowski 2005) to estimate the allelic richness (Ar) and the private allelic richness (PAr) in each cluster, by using the rarefaction method that standardize the number of alleles to the smallest population sample in our data set. Rarefaction was also used to compare Ar and PAr values per region (northeast and northwest) standardizing the number of populations sampled per region. Genotypic distributions at each cluster were tested for conformance to Hardy–Weinberg expectations by the exact test implemented in Genepop 4.0 (Raymond and Rousset 1995). The unbiased composite-linkage disequilibrium measure (D) of this program tested possible gametic disequilibria for all possible pairs of loci in each cluster. The sequential Benjamini-Yekutieli correction (Narum 2006) was applied to every single test to adjust the significance levels for multiple simultaneous comparisons. Allele frequency differences among clusters were evaluated by the exact probability test of Genepop 4.0. The weighted analyses of variance in the allele frequencies (pairwise FST), was used to assess genetic differentiation between each pair of clusters, and their significance were tested by randomizing genotypes between cluster pairs by performing 1000 permutations with FSTAT 2.9.3. It is expected that if gene flow exists among clusters we will find high genetic diversity values associated with a low genetic differentiation (FST). Contemporary migration rates (M) between cluster pairs were estimated using Bayesas 1.3 (Wilson and Rannala 2003). We performed 3 × 106 iterations, and data were recorded by 2000 iterations, with a burn-in period of 106 iterations, to ensure that the starting parameters of the model were randomized. The delta values were adjusted following the recommendations in the user manual. We performed five runs using different starting points and kept the results for the highest likelihood model (Faubet et al. 2007). The analysis of molecular variance (AMOVA) implemented in ARLEQUIN 3.1 (Schneider et al. 2000) quantified the percentage of spatial components on the total genetic variance (FST) according to a hierarchical model.

The Bottleneck program (Piry et al. 1999) was used to detect evidence of recent population bottlenecks in the studied populations. We used a two-phased model of mutation (TMP) with default values (70% single-step mutation and 30% multiple-step mutation).

Although our sampling was expected to mostly include unrelated individuals, some highly related individuals could not be discarded in the Barcelona Zoo population. Therefore, we used COLONY v2.0.6.6 (Jones and Wang 2010) to allocate individuals into sibling groups of full-sib families nested within half-sib families without information on parental genotypes. We tested COLONY forcing polyandry (Morán et al. 2009) and assumed an error rate of 2% caused by allelic dropouts and 0.1% erroneous allele sizing. Afterwards, we tested whether genetic differentiation was maintained when highly closely related individuals (full-sibs) were excluded from the analysis.

Results

We observed an average of 2.1% missing values, ranging from 0% at the EEU5 locus to 9.7% at the EEU12 locus. Missing values were confirmed after reanalyses, and genotyping for each locus was confirmed by the reanalysis of 50% of individuals. The number of alleles per locus ranged between 4 (EEU36) and 19 (EEU43), with an average number of alleles of A = 5.841. While the gene diversity (HS = 0.604) was high overall, it was lower in the north-eastern region (HS = 0.573) than in the north-western populations (HS = 0.696). Allelic richness standardized by the number of populations sampled per region was also higher in the northwest than in the northeast (4.964 vs 3.925, Table 1), and a Student’s t-test indicated that both Ar and PAr values differed significantly between these two regions (0.001 < P < 0.05 in both cases) (Table 1).

Table 1 Genetic diversity

Distribution of genetic diversity and identification of clusters

At the uppermost level of the hierarchy, STRUCTURE clearly differentiated samples from north-western and north-eastern Iberia (K = 2). Individuals in the north-western region had the highest assigned coefficients (> 0.95), whereas some individuals from the northeast showed admixed ancestry of the two clusters (Fig. 2A.1, Supporting Information, Table S1). STRUCTURE did not detect substructure within the north-western cluster (K = 1), but four different groups were identified within the north-eastern region (K = 4, Fig. 2A.2). Individuals from the most north-eastern area (Girona) and those from the Zoo population were clearly grouped into two different clusters, with some level of admixture in a few individuals. The two remaining clusters were distributed among individuals from Central Catalonia with only a slight pattern of distribution. The results of Bayesian analyses considering the spatial location of individuals mostly agreed with the STRUCTURE results. BAPS and GENELAND identified two clusters that coincided with those identified by STRUCTURE in Girona and Zoo. BAPS grouped all remaining individuals in a single third cluster (Central Catalonia, Fig. 2B), whereas GENELAND clearly grouped these individuals into two clusters that separated individuals from the Barcelona area within the Central Catalonia cluster (Fig. 2C, Supporting Information, Table S1).

Fig. 2
figure 2

Admixture analyses by STRUCTURE, BAPS and GENELAND. Each individual is represented as a vertical bar partitioned into segments according to the proportion of the genome belonging to each of the identified clusters (K). A STRUCTURE: A.1: all samples (K = 2), A.2: north-eastern samples (K = 4). B BAPS with north-eastern samples (K = 3). C GENELAND with north-eastern samples (K = 4)

A model of four populations among all individuals was also estimated by the DAPC analyses. According to a-score optimization, we retained 11 principal components (PCs) and two discriminant functions (DA) that explained 92.5% of the variance in the data. The DAPC scatterplot on the two first DA grouped individuals into four clusters (Girona, Central Catalonia, Zoo and Northwest) (Fig. 3); which mainly coincided with the Bayesian clustering. The first discriminant axis of the DAPC explained 76.2% of the total variation and differentiated the northeast and northwest groups. The second axis described 16.3% of the variation and distinguished samples from the three north-eastern populations despite some individuals from Girona and Central Catalonia showed an overlapped distribution. At the individual level, discordances in the assignments were observed only in a few individuals assigned to Girona by the DAPC and to Central Catalonia by Bayesian methods. At a micro-geographical scale, the DAPC analyses did not detect any level of substructure within clusters except within the Central Catalonia group. For this subset, DAPC analyses retained 5 PCs and a single discriminant function that explained 100% of the variation. This substructure grouped individuals in two clusters that differentiated individuals from the area of Barcelona from the rest of Central Catalonia and more or less coincided with the clustering described by GENELAND (Fig. 3).

Fig. 3
figure 3

DAPC scatterplot. A Clustering of all individuals coloured according to the genetic cluster obtained by K-means clustering and assignment of individuals to each cluster. B DAPC sub-clustering and individual assignments within the Central Catalonia cluster, where a single DA explained genetic variation

Taking into account the most coincident results between all the Bayesian and the DAPC analyses, we considered three populations in the north-eastern region (Girona, Central Catalonia and Zoo) and a single fourth population in the north-western region in all posterior analyses.

Genetic diversity within clusters

After Benjamini-Yekuteli corrections, Hardy–Weinberg disequilibrium occurred in all but the northwestern clusters. In Girona and Central Catalonia, this was explained by disequilibrium at one (EEU1) and three loci (EEU5, EEU43 and EEU54), respectively. In the Zoo population, three (loci EEU1, EEU43 and EEU54) out of the 11 loci showed Hardy–Weinberg disequilibrium associated with a deficit of heterozygotes with index fixation (F) values of approximately 0.5 in all cases. MICRO-CHECKER analyses indicated that some of these deviations could be explained by the presence of null alleles at these loci. Null alleles have been previously described at the EEU43 and EEU54 loci (Zolotareva et al. 2021). The frequency of null alleles estimated by FreeNA (Chapuis and Estoup 2007) was higher than 0.2 in only two cases (EEU1 in Girona and EEU43 in Central Catalonia, Supporting Information, Table S3). According to results from FreeNA, estimation of the genetic differentiation (FST) excluding null alleles or using the ENA correction did not differ significantly, neither at the global level (FST = 0.129 versus FST = 0.123) nor in pairwise comparisons (Supporting Information, Table S3). Gametic disequilibrium was observed in the Central Catalonia and Zoo groups (in six and eight out of the 55 tests, respectively). In Central Catalonia, these groups comprised different loci, but in the Zoo, they involved mainly the EEU1 and EE54 loci. However, after Benjamini-Yekuteli corrections, only two significant deviations were detected in Central Catalonia (EEU6EEU43; EEU2–EEU3 loci) and one in the Zoo (EEU3EEU12 loci).

The highest values of genetic diversity were found in the north-western group (Ar = 4.964; PAr = 3.427, Hs = 0.696), and the lowest was found in Girona (Ar = 3.116; PAr = 1.578, Hs = 0.541). For all loci, the presence of private alleles ranged from 31 in the northwest cluster to 1 in Girona. Values of genetic diversity differed significantly among samples only when the north-western cluster was included in comparisons.

The Garza and Williamson (2001) index value, calculated by ARLEQUIN, was approximately 0.3–0.4, indicating a recent reduction in population size in all clusters. However, no signals of recent bottlenecks were detected by testing heterozygote excess in the BOTTLENECK program.

The study of the family relationships indicated no full-sib families within any cluster except in the Zoo population, where a single full-sib family of 4 members was identified. Genetic differentiation estimated retaining only one individual from this full-sib family did not differ significantly from values with all data (FST = 0.129 versus FST = 0.124).

Population structure

Hierarchical analyses of molecular variance (AMOVA) assigned a higher genetic variance to the differences between north-western and north-eastern clusters (11.56%) than among groups within these clusters (6.99%), with 81.43% of variance assigned within populations. All components of variance contributed significantly to genetic differentiation (P < 0.001). Overall FST was 0.129, but it reduced to 0.087 when the north-western cluster was excluded. Significant FST values were observed between all cluster pairs (P < 0.05). The highest FST values were observed between the north-western and north-eastern groups. High differentiation was also found between the Girona cluster and Zoo population, and the lowest FST was between Zoo and Central Catalonia clusters (Table 2).

Table 2 Pair-wise FST values between clusters and its significance: **P < 0.01 *P < 0.05

In the north-eastern region, the contemporary migration rates (m) between cluster pairs, measured by Bayesass, were mainly unidirectional. High migration rates were detected from Central Catalonia to the rest of the clusters (m = 0.29 in both cases), but these rates were low in the opposite direction (m < 0.01). However, these results should be interpreted with caution because the number of individuals in the Central Catalonia group doubled those in the Girona and Zoo groups, and recent gene flow can be overestimated with small sample sizes (Faubet et al. 2007). The lowest migration value was obtained from the Zoo to the Central Catalonia group (0.0093), contrasting with the migration rate calculated in the opposite direction.

The Mantel test considering individuals from all populations indicated a weak but significant pattern of IBD in all cases (R = 0.455; P = 0.01). However, all these correlations (even those that were significant) decreased when IBD was tested within the two regions, the north-western region (R = 0.232; P = 0.013) and the north-eastern region (R = 0.160; P = 0.010), separately.

Discussion

Population structure

The hedgehogs in the study area were clearly grouped into two genetically well-differentiated clusters: the north-western and the north-eastern clusters. These groups fully coincide with the distribution of the two pre-glacial phylogenetic lineages described in the Iberian Peninsula by mtDNA, and it seems that phylogeographic events could explain such differentiation (Sanz et al. 2021). Large genetic differentiation between populations of the eastern and western Peninsula has been observed in other small mammals, such as the Stone Marten Martes foina E. (Vergara et al. 2015). At a macrogeographical scale, the population structure of E. europaeus has also been related to the postglacial colonization of two different phylogeographic lineages in Eastern Europe (Zolotareva et al. 2021).

At a low hierarchical level, a significant genetic structure was also detected within the north-eastern group. Genetic differentiation has been described in small mammal species with territorial behaviours (Becher and Griffiths 1998). However, European hedgehogs are not territorial (Reeve 1982). The differentiation among clusters could then be related to isolation because of habitat fragmentation by natural or artificial barriers. In the north-eastern region, the distribution of three different populations was slightly related to an IBD pattern associated with limited dispersion. This weak IBD pattern was evidenced by the high admixture ancestry in some individuals, probably due to recent migrations from the Central Catalonia group to Girona and Zoo populations. Braaker et al. (2017) related a similar differentiation pattern in Zurich to major rivers and transportation axes that restricted gene flow. Alternatively, Osaka et al. (2021) failed to detect genetic differentiation among urban hedgehogs around Helsinki, but they suggested a lack of structure with an overall genetic homogeneity due to a recent natural expansion or an artificial introduction of the species, and not the absence of geographical barriers to gene flow. Additionally, Bolfiková et al. (2013) found four genetic hedgehog populations with high proportions of admixed individuals in a comparable territory in New Zealand (268,021 km2), but these authors studied introduced populations, and their diversity and population structure could be modelled by their introduction history.

Despite some gene flow among populations, the presence of a great number of private alleles (Table 1) and the significant genetic differentiation among clusters indicated some isolation, mainly in the Girona and Zoo populations. In addition, incipient population fragmentation was observed within the Central Catalonia cluster, partially isolating hedgehogs from the Barcelona area and possibly being responsible for the Hardy–Weinberg and gametic disequilibria found in this cluster. The genetic differences observed in north-eastern Iberia are comparable with those detected in other hedgehogs from urban areas, such as Oxfordshire (Becher and Griffiths 1998), Zurich (Braaker et al. 2017) or Berlin (Barthel et al. 2020), and in rural Danish populations (Rasmussen et al. 2020), all of which are associated with habitat fragmentation. The effect of natural landscape elements such as large rivers on the population structure pattern has been well described in hedgehogs by Braaker et al. (2017) and Ploi et al. (2020). In our region, the mountains of “Massís de les Gavarres” and the “Massís de Cadiretes” (altitude 533 and 519 m, respectively) could act as geographical barriers that partially limit gene flow between Girona and Central Catalonia. The presence of mountains as a physical barrier has been reported in other small mammals of the order Eulipotyphla, such as Sorex araneus L. (Moska et al. 2012), although in this case, the mountains are approximately 1000 m in elevation. The network of roads, mainly motorways, that are present in the studied area could also represent artificial barriers to the mobility of hedgehogs because only a few individuals are able to cross wide roads (Huijser and Bergers 2000; Rondinini and Doncaster 2002; Braaker et al. 2017). However, the admixture levels detected in Central Catalonia, which is an area crossed and surrounded by motorways (Fig. 1), are more concordant with the idea that hedgehogs crossroads regularly at night when human activity levels decrease (Dowding et al. 2010) and that hedgehogs use road verges as movement corridors (Doncaster et al. 2001). In this sense, Rasmussen et al. (2020) also failed to associate road density with hedgehog habitat fragmentation.

On the other hand, the Zoo group could be particularly isolated, with only some sporadic contact with urban hedgehogs from Barcelona (Central Catalonia cluster). According to the unidirectional gene flow observed, it seems that some individuals from Barcelona reach the zoo, but practically no hedgehog leaves. Zoo fences do not prevent movement in either direction, therefore the isolation of this group could be explained because hedgehogs find favourable habitats and resources within the zoo facilities, and they do not migrate to find better conditions (Doncaster et al. 2001). The Zoo could thus act as an ecological trap, a situation that has been described for hedgehogs and other mammal species (Bolfíková and Hulva 2012; Vlaschenko et al. 2019). Ecological trapping in isolated favourable habitat patches has been proposed to explain interspecific coexistence of E. europaeus and E. roumanicus in Central Europe (Bolfíková and Hulva 2012). In the absence of connectivity, in urban environments these ecological traps can lead to fatal consequences for the contained populations (Vlaschenko et al. 2019). The situation of the Zoo population is similar to that described in hedgehogs inhabiting green patches in Berlin. These habitats are fenced or surrounded by big streets and heavy-traffic roads. In this case, the restriction of gene flow leads to a population structure of gamodemes explained by the concentration of related individuals within these patches (Barthel et al. 2020).

Genetic diversity: north-western vs north-eastern populations

The genetic diversity values obtained in the north-western region of our study area are comparable with those observed in other European hedgehog populations (Hs = 0.70, Becher and Griffiths 1998; Hs = 0.69, Bolfíková and Hulva 2012). However, these studies included more extensive areas and higher numbers of individuals. Surprisingly, with only 14 sampled individuals, northwest Iberia presented the highest genetic diversity values, even when diversity estimates were corrected by the differences in sampling effort between the two regions. Similarly, mitochondrial analysis indicated high haplotype diversity and demographic stability in the northwest (Sanz et al. 2021). High gene diversity values in populations of E. europaeus could be a consequence of the multiple paternities of hedgehogs (Morán et al. 2009). Instead, the genetic diversity measured in the north-western populations contrasted with the lower values observed in the north-eastern group. According to mtDNA studies, this lower genetic diversity could be related to the phylogeographic isolation of the eastern region, which is surrounded by the Pyrenees Mountains and Ebro River. Alternatively, these results could also suggest a better conservation of hedgehog populations in the northwest, which could be explained by the low human population and road network densities. Genetic diversity values similar to those found in the north-eastern region have been described in urban hedgehogs from highly fragmented habitats in Switzerland (Braaker et al. 2017) and Oxfordshire (Becher and Griffiths 1998) and even in rural mosaiced habitats in Italy (Iannucci et al. 2019) and Central Europe (Bolfíková and Hulva 2012). Even lower values of genetic diversity have been found by Osaka et al. (2021) in Helsinki populations because of founder events during the recent expansion of the species. Additionally, genetic diversity values observed in north-eastern Iberian hedgehogs are clearly lower than those reported for other small mammals from the order Eulipotyphla, such as Sorex araneus in Europe (Andersson et al. 2004; Moska et al. 2012).

Conclusions and conservation perspectives

It is clear from our results that the vulnerable situation described above for Iberian hedgehogs is most evident in the natural population from the Barcelona Zoo. In fact, it was only in this population that we to a full-sib family of four members and Hardy–Weinberg disequilibrium associated with a heterozygote deficit that could indicate some level of inbreeding in this population. It is said that the Barcelona Zoo hedgehog population predates the existence of the zoo itself, and this was there when King Felipe V demolished a third of the city of Barcelona to build a military citadel. Since 1714, these hedgehogs have resisted military life, the construction of the zoo and the Spanish civil war, among other events that disturbed their wildlife. However, the high genetic isolation associated with inbreeding evidenced by microsatellite data from 2009 indicates that the short-term survival of this population may be imperilled. In fact, the last census of this population in 2018 considered the Zoo population to be almost extinct. This extremely vulnerable situation resembles that described in the Regent’s Park in London: another small fluctuating population of very few hedgehogs that breed in an isolated green area next to the Zoo, in the middle of a big city (https://www.royalparks.org.uk/managing-the-parks/conservation-and-improvement-projects/hedgehogs). In the Barcelona Zoo, since 2018, a programme based on the introduction of individuals rescued in wildlife rehabilitation centres has been set up to reinforce the population and counteract inbreeding.

Hedgehogs are animals that are regularly brought to wildlife rescue centres, and sometimes the areas from which these animals are accepted are not taken into account when they are released. Human-mediated translocation can occur between different locations and promote gene flow between natural fragmented habitats (Ploi et al. 2020; Rasmussen et al. 2020; Osaka et al. 2021). Translocation of rescued individuals has been proposed to explain the lack of genetic differentiation among demes of urban Berlin (Barthel et al. 2020). These practices are also common in our region, and might be diluting the genetic differences among locations. This could also explain why some individuals found in the same geographical locations belong to different genetic clusters. Therefore, natural hedgehog dispersal could be more reduced that we inferred, and fragmentation could be even more exacerbated. Whether these human-mediated translocations serve to avoid inbreeding and fragmentation or dilute the native population structure pattern might be questionable. Our preliminary results suggest that these practices could be used to reinforce endangered populations similar to those from the Barcelona Zoo, but genetic monitoring of these introductions to confirm the resulting increase in gene diversity is necessary. On the other hand, human-mediated translocations between areas that are fragmented by natural barriers should be avoided, as they might disrupt local adaptations (De Jong et al. 2020). Moreover, because regional differences in endo-parasites have been observed among different hedgehog populations in Denmark, the prevention of spreading infectious diseases is another argument for avoiding human-mediated translocation (Rasmussen et al. 2021).

Finally, the conservation of populations such as those from the Barcelona Zoo that persist in urban landscapes should be of special interest because of their special role in biodiversity conservation (Aronson et al. 2017). Green areas provide sufficient connectivity to avoid habitat fragmentation in the urban landscape of Berlin (Barthel et al. 2020), and, for some mammalian species, management strategies that take into account small urban gardens as ‘natural’ corridors have been used successfully (Van Helden et al. 2020). A similar management strategy could be promoted in Barcelona city for hedgehog conservation. On a larger geographical scale, monitoring hedgehog populations and actions to improve hedgehog habitats and natural corridors are also recommended in the entire north-eastern Iberian region.