# Fine-scale genetic structure in the critically endangered red-fronted macaw in the absence of geographic and ecological barriers

Guillermo Blanco, Francisco Morinha, Séverine Roques, Fernando Hiraldo, Abraham Rojas, José L Tella

<figure><img src="image_1.png" /></figure>

## To cite this version:

Guillermo Blanco, Francisco Morinha, Séverine Roques, Fernando Hiraldo, Abraham Rojas, et al. "Fine-scale genetic structure in the critically endangered red-fronted macaw in the absence of geographic and ecological barriers." Scientific Reports, 2021, 11 (1), pp.556. 10.1038/s41598-020-79575-6. hal-03542772

HAL Id: hal-03542772

https://hal.inrae.fr/hal-03542772

Submitted on 25 Jan 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_3.png" /></figure>

OPEN

# Fine-scale genetic structure in the critically endangered red-fronted macaw in the absence of geographic and ecological barriers

Guillermo Blanco<fnref n="1" />✉, Francisco Morinha<fnref n="1" />, Séverine Roques², Fernando Hiraldo³, Abraham Rojas⁴ & José L. Tella³

Behavioural and socio-cultural traits are recognized in the restriction of gene flow in species with high cognitive capacity and complex societies. This isolation by social barriers has been generally overlooked in threatened species by assuming disrupted gene flow due to population fragmentation and decline. We examine the genetic structure and ecology of the global population of the Critically Endangered red-fronted macaw (*Ara rubrogenys*), an endemic species to the inter-Andean valleys of Bolivia. We found a fine-scale genetic structuring in four genetic clusters. Genetic diversity was higher in wild compared to captive-bred macaws, but similar to that of captive wild-caught macaws. We found no clear evidence of severe genetic erosion in the population in recent decades, but it was patent in historic times, overlapping with drastic human habitat transformation and macaw persecution over millennia. We found no evidence of geographical and ecological barriers, owing to the high dispersal ability, nesting and foraging habits between genetic clusters. The lack of genetic intermixing despite long-distance foraging and seasonal movements suggests recruitment in natal colonies and other social factors reinforcing philopatry-related genetic structure. Conservation efforts should be specifically focussed on major threats in each genetic cluster as independent conservation units, and also considered in ex-situ management.

Genetic structure of populations is the result of multiple ecological and evolutionary forces acting in concert<fnref n="1" />,². Limitations to gene flow by geographic barriers or limited dispersal ability are often highlighted as primary causes of differentiation and genetic structure owing to distance among population nuclei³. This process is often linked to geo-climatic features, which can also be a main source of ecological filters to gene flow leading to isolation by adaptation<fnref n="1" />,⁴. Distinguishing between these major mechanisms by their contribution to genetic structure of populations is often challenging for terrestrial birds with high dispersal capacity and generalised habitat use⁵. Recently, behaviour and socio-cultural traits have become increasingly recognized in the restriction of gene flow among populations of species with high cognitive capacity and complex societies, especially mammals like cetaceans and primates including humans⁶.

In birds, evidence of isolation by social barriers is still scarce and restricted to species with complex societies⁷,⁸. Crows, jays and other corvids (Corvidae, Passeriformes) and parrots and allies (Psittaciformes), are among the birds with a recognised high cognitive capacity, evolving in parallel to complex patterns of social behaviour driving population organisation⁹,¹⁰. Social barriers to gene flow can act through recognition among individuals from population nuclei showing particular social and behavioural identities¹¹. For instance, socio-cultural factors may have played a role in driving genetic structure associated with tool use even at small spatial scales¹²,¹³. Complex hierarchical, social and ritualised interactions among group members, high mate and site fidelity, and complex

<footnote n="1">¹Department of Evolutionary Ecology, National Museum of Natural Sciences (MNCN), Spanish National Research Council (CSIC), José Gutiérrez Abascal 2, 28006 Madrid, Spain. ²Irstea-UR EABX, Ecosystèmes Aquatiques et Changements Globaux, Equipe FREEMA, 50 avenue de Verdun, 33 612 Cestas, France. ³Department of Conservation Biology, Estación Biológica de Doñana (CSIC), Avda. Américo Vespucio, 41092 Sevilla, Spain. ⁴Zoológico Municipal de Fauna Sudamericana, Radial 27, Tercer Anillo Interno, Santa Cruz de la Sierra, Bolivia. ✉email: g.blanco@csic.es</footnote>
vocalisations have been suggested to be involved in the extreme genetic structure in the Red-billed chough (*Pyr-rhocorax pyrrhocorax*) despite high dispersal ability and large population size⁸. Evidence of these social traits and population organisation patterns also exists for parrots¹⁴,¹⁵, especially linked to complex vocalisations and dialects¹⁶,¹⁷. However, the contribution of geographical, ecological and social barriers to genetic structure of parrot populations has been poorly investigated at large population scales.

Evaluating the processes and mechanisms that determine the genetic structure of populations is essential to understand their demographic and ecological dynamics¹⁸. In general, emigration and immigration between breeding nuclei have been highlighted as key factors driving the genetic structure of populations, since even a small number of these exchanges per generation can have a great influence on population homogenisation due to the mixture of different genetic pools¹⁹. Depending on the magnitude of connectivity between populations and on the reproductive outcomes of dispersers, the genetic structure and diversity can be more or less pronounced. This variability can be further modulated by historical trends due to past and ongoing threats eroding the viability of isolated nuclei and of highly fragmented and small populations of threatened species²⁰⁻²². The influence of isolation by social barriers on the genetic structure of threatened species has been generally overlooked, often through assumptions that connectivity is generally disrupted due to population fragmentation associated with habitat loss and population declines. However, fine-scale genetic structure can be an intrinsic feature evolving in particular species²³,²⁴, as promoted by socio-cultural forces driving pairing, dispersal and group cohesion even in large and widely distributed populations of social species⁸,²⁵. A comprehensive evaluation of these traits is paramount to understanding the structure and functioning of metapopulations and for adequate conservation management, including captive breeding and reintroduction of threatened species²⁶,²⁷.

Here, we examine the global population genetic structure of the Critically Endangered red-fronted macaw (*Ara rubrogenys*). This species represents a suitable study model to investigate the potential drivers of genetic structuration of rare social species distributed in discrete population nuclei associated with breeding colonies interconnected by long-distance movements²⁸⁻³⁰. We inferred population structure from individual genotypes at nine microsatellite loci from a large part of the main breeding areas throughout its restricted global distribution range in the inter-Andean valleys of Bolivia³⁰. We focussed on genetic diversity, inbreeding, differentiation and connectivity among population nuclei, and tested for patterns of contemporary demography through bottleneck analysis. Our main goal is to explore potential mechanisms promoting and limiting gene flow between subpopulations and genetic clusters, and whether isolating processes related to geographic barriers to dispersal, adaptation to particular habitats, and social organisation can explain the current genetic structure of the global population. We also evaluated the genetic characteristics of several captive populations to assess their most likely wild population nuclei of origin. We discuss ways to apply the information about genetic structure to the conservation of the whole population or of particular genetic clusters, and how this should drive ex-situ conservation management, including captive breeding and reintroduction.

## Results

**Sample inclusion criteria and population genetic structure.** In total, 162 alleles were amplified to estimate error rates, i.e. 9 samples typed for 9 alleles, but only 104 (64%) were considered in the analysis after excluding alleles that did not amplify in at least one of the reactions. These unsuccessful amplifications are related to low DNA quantities obtained from feather samples. No evidence of false alleles were detected and only three allelic dropouts (one for locus AgGT90 and two for locus Peeµ11) were identified. The overall error rate was low (2.9%) considering that low quality DNA samples are more prone to genotype errors. The cumulative probabilities estimated for the nine microsatellite loci were $P_{(ID)} < 0.0001$ and $P_{(ID)sib} = 0.0013$ (Table S1, Fig. S1).

The analysis of genetic relatedness and/or molecular sexing identified 94 different wild individuals (genotypes of each individual are shown in Appendix S1). Among them, a total of twelve full-sibs were identified in different population groups (three in W1; one in W2; six in W3; two in W4). The analysis of genetic differentiation with and without full-sibs did not affect the results of the clustering analysis. Thus, the full data set with 94 wild individuals was used in all subsequent analyses. The complete data set includes 146 individuals (94 from wild populations and 52 from captive birds) with low levels of missing data (one individual missing three loci; eight individuals missing two loci; 18 individuals missing one locus) (Appendix S1).

The Bayesian clustering analysis of multilocus genotypes using sample location prior clearly revealed a small-scale genetic structure of four population nuclei, namely W1 (A), W2 (B), W3 (C, D, E) and W4 (F, G) (Fig. 1a,b). The number of clusters was supported by both approaches used to estimate the optimal *K* value (Fig. 1b; Fig. S2a, b). The hierarchical clustering performed in the second level of STRUCTURE did not detect evidence of population differentiation between sites of clusters W3 and W4. No genetic differentiation was detected in the analysis without sample location priors. All pairwise *F*<sub>st</sub> and *altitude* estimates were significant (*P* < 0.01) and highly correlated (*r* = 0.99; *P* < 0.05) (Table 1). The highest values involved the comparisons between cluster W1 and the other clusters. The lowest values involved adjacent clusters, W2-W4 and W3-W4 respectively. A PCoA analysis among wild population groups also supports the STRUCTURE, *F*<sub>st</sub> and *D*<sub>est</sub> estimates (Supplementary Fig. S3a, b).

The captive individuals were clustered into three distinct genetic groups, namely C1 (ZOOL and PALM), C2 (CCHA and LPQU) and C3 (LESL) (Fig. 2a). The Bayesian clustering analysis of the dataset including both captive and wild individuals resulted in five different genetic clusters (Fig. 2b). The W4 wild population and C2 captive group belong to the same cluster. The C1 captive group showed a mixed ancestry from individuals belonging to W1 and W2 wild populations (Fig. 2b). These cluster patterns were obtained using the LOCPRIOR option. No genetic structure was observed in both analyses without sample location priors. The optimal *K* values were estimated using the previous developed approach for complex and highly structured data sets. The Δ*K* method underestimate the number of clusters in the first level of structure analysis when captive groups where included (*K* = 2 for both clustering analysis, Fig. S2c–f).
<figure><img src="image_4.png" /><figcaption>**Figure 1.** (a) Distribution range of the red-fronted macaw showing the sampled population nuclei (represented by letter codes: black letters for breeding nuclei, red letter for the single non-breeding area sampled) pooled in genetic clusters (represented by colours). The number of breeding pairs in each population nucleus at the time this study was conducted is represented by black numbers, while the maximum flock size in each breeding and non-breeding areas is represented by red numbers. Black points represent breeding colonies. (b) Distinct genetic clusters from the Bayesian clustering analysis with prior information on sampling location are shown for several K clusters. Each vertical line corresponds to one individual and the different colours represent the assignment to each cluster, with K=4 as the optimal number of clusters estimated. Map was generated with ArcGIS 10.5 software (ESRI, Redland, USA, https://desktop.arcgis.com/en/) and modified with Microsoft PowerPoint 2010 (Microsoft Corporation, Redmond, WA, USA, https://www.microsoft.com/pt-pt/microsoft-365/previous-versi ons/office-2010), both software under CSIC Organizational License. Background was generated from Digital Elevation Model available from USGS (Global 30 Arc-Second Elevation, GTOPO30), freely available at https:// www.usgs.gov/centers/eros/science/usgs-eros-archive-digital-elevation-global-30-arc-second-elevation-gtopo 30?qt-science_center_objects=0#qt-science_center_objects. Author of the photograph: José L. Tella.</figcaption></figure>

<table><caption>**Table 1.** Pairwise values of *F*<sub>st</sub> (below diagonal) and *D*<sub>est</sub> (above diagonal) among genetic clusters of red-fronted macaw in the wild. All estimated values are significant (*P* < 0.01).</caption><thead><tr><th rowspan="2"></th><th colspan="4">Genetic cluster</th></tr><tr><th>W1</th><th>W2</th><th>W3</th><th>W4</th></tr></thead><tbody><tr><th>W1</th><td>-</td><td>0.157</td><td>0.086</td><td>0.114</td></tr><tr><th>W2</th><td>0.106</td><td>-</td><td>0.083</td><td>0.058</td></tr><tr><th>W3</th><td>0.059</td><td>0.049</td><td>-</td><td>0.055</td></tr><tr><th>W4</th><td>0.074</td><td>0.030</td><td>0.036</td><td>-</td></tr></tbody></table>

PCoA including both captive and wild individuals also indicated that the genetic composition of those groups is close, with the exception of the C3 group, which is genetically differentiated from the rest (Supplementary Fig. S3c, d).

**Genetic diversity and demographic events.** The polymorphic microsatellite loci selected for this study (Table S2) allowed the amplification of 62 different alleles, ranging from 3 (MmGT057 and UnaCT74) to 13
<figure><img src="image_5.png" /><figcaption>**Figure 2.** (a) Distinct genetic clusters from the Bayesian clustering analysis with prior information on sampling location are shown for several *K* clusters for captive red-fronted macaws, where the optimal number of clusters was estimated for *K*=3. (b) Clustering analysis combining captive and wild individuals, where the optimal number of clusters was estimated for *K*=5. Each vertical line corresponds to one individual and the different colours represent the assignment to each cluster. Colours assigned to each cluster correspond to the genetic clusters obtained for the wild population (see Fig. 1), except for the cluster C3 that cannot be assigned to any cluster in the wild.</figcaption></figure>

(AgGT21), with an average of 6.89 alleles. At a locus level, average values of allelic richness ranged between 2.04 (UnaCT74) and 6.56 (AgGT21), mean observed heterozygosity ranged between 0.25 (UnaCT74) and 0.81 (UnaCT43), and the mean expected heterozygosity ranged between 0.23 (UnaCT74) and 0.74 (UnaCT43 and AgGT90) (Supplementary Table S3). The power of discrimination of most markers is supported by PIC values (global mean of 0.52 ± 0.22), although low PIC values were obtained for MmGT057 (0.25) and UnaCT74 (0.20). Average *F*<sub>IS</sub> values ranged between – 0.08 (UnaCT43 and UnaCT74) and 0.07 (AgGT90). Deviation from Hardy–Weinberg equilibrium (HWE) after Bonferroni correction was detected only for locus (AgGT90) in the W4 cluster (Supplementary Table S3). No significant evidence for linkage disequilibrium was found, suggesting that the assayed loci assorted independently.

At a population level, no evidence of deviations from Hardy–Weinberg equilibrium (HWE) was detected in the wild population, except for W1, which showed a significant heterozygote deficit (Table 2). This can be a result biased by the substantially lower *H*<sub>O</sub> than *H*<sub>E</sub> of the locus *Pee*<sub>11</sub> in cluster W1 (Table S3), probably influenced by allelic dropout and some missing data at this locus. *F*<sub>IS</sub> for the cluster W1 (0.12) was the largest of all the wild groups (Table 2). The presence of null alleles is unlikely given the strict selection of markers to discard such bias. Captive groups were in HW equilibrium, except C3, which showed significant heterozygote excess (Table 2) suggesting that breeding between individuals did not occur by chance.

A mean of 4.25 alleles per locus was detected among the 94 genotyped wild macaws. We found a similar value (N<sub>A</sub> = 4.50) in captive samples from Bolivia, while in captive-bred individuals from Spain the diversity was extremely low (N<sub>A</sub> = 2.7) (Table 3). Mean observed and expected heterozygosity in wild population clusters were 0.56 and 0.58, respectively. The heterozygosity value was the lowest in W1 (H<sub>O</sub> = 0.46) (Table 2). Mean diversity values of captive groups C1 and C2 were similar to those found in the wild populations, but lower diversity indices were found in C3 (Table 2). In captive clusters, mean values of observed and expected heterozygosity were 0.63 and 0.55, respectively. In all captive groups, H<sub>O</sub> was higher than H<sub>E</sub>, what is expected after a recent reduction in size and/or founder event. The magnitude of allelic richness values was similar across wild and captive genetic clusters, except C3, which showed reduced values of allelic richness (2.92 ± 1.10) and number
<table><caption>**Table 2.** Genetic diversity for each cluster of wild and captive red-fronted macaw. Codes represent the sampling sites as shown in Table 3. *n* number of samples, *N*<sub>A</sub> number of alleles, *A*<sub>R</sub> allelic richness, *H*<sub>O</sub> observed heterozygosity, *H*<sub>E</sub> expected heterozygosity, *F*<sub>IS</sub> inbreeding coefficients. \* *p* < 0.05; \*\* *p* < 0.01.</caption><thead><tr><th>Genetic cluster (code)</th><th>n</th><th>N<sub>A</sub></th><th>A<sub>R</sub></th><th>H<sub>O</sub></th><th>H<sub>E</sub></th><th>HW P value (Heterozyg. Deficit)</th><th>HW P value (Heterozyg. Excess)</th><th>F<sub>IS</sub></th></tr></thead><tbody><tr><td>W1 (A)</td><td>16</td><td>4.44 (2.07)</td><td>4.17 (2.00)</td><td>0.46 (0.26)</td><td>0.50 (0.30)</td><td>&lt;0.01**</td><td>0.99</td><td>0.12*</td></tr><tr><td>W2 (B)</td><td>14</td><td>4.44 (2.07)</td><td>4.18 (1.83)</td><td>0.56 (0.20)</td><td>0.58 (0.18)</td><td>0.09</td><td>0.91</td><td>0.07</td></tr><tr><td>W3 (C, D, E)</td><td>45</td><td>5.78 (2.68)</td><td>4.47 (1.78)</td><td>0.59 (0.26)</td><td>0.59 (0.24)</td><td>0.29</td><td>0.71</td><td>0.01</td></tr><tr><td>W4 (F, G)</td><td>19</td><td>5.00 (2.18)</td><td>4.60 (1.98)</td><td>0.61 (0.18)</td><td>0.63 (0.18)</td><td>0.05</td><td>0.95</td><td>0.07</td></tr><tr><td>C1 (ZOOL, PALM)</td><td>13</td><td>4.22 (1.56)</td><td>4.05 (1.42)</td><td>0.61 (0.23)</td><td>0.54 (0.19)</td><td>0.89</td><td>0.11</td><td>-0.09</td></tr><tr><td>C2 (CCHA, LPQU)</td><td>18</td><td>5.11 (3.10)</td><td>4.67 (2.46)</td><td>0.65 (0.29)</td><td>0.61 (0.23)</td><td>0.88</td><td>0.12</td><td>-0.05</td></tr><tr><td>C3 (LESL)</td><td>21</td><td>3.22 (1.39)</td><td>2.92 (1.10)</td><td>0.63 (0.28)</td><td>0.49 (0.21)</td><td>1.00</td><td>&lt;0.01**</td><td>-0.27</td></tr></tbody></table>

<table><caption>**Table 3.** Sampling characterisation, circumstances around sample collection and microsatellite genetic diversity indices for all localities. *N*<sub>A</sub> number of alleles, *H*<sub>O</sub> observed heterozygosity, *H*<sub>E</sub> expected heterozygosity. <sup>a</sup>Number of samples included in the final data set considering only one sample per individual and the missing data threshold.</caption><thead><tr><th>Country</th><th>Area (code)</th><th>Origin</th><th>Sample type</th><th>n<sup>a</sup></th><th>Sample collection</th><th>N<sub>A</sub></th><th>H<sub>O</sub></th><th>H<sub>E</sub></th></tr></thead><tbody><tr><td>Bolivia</td><td>Icla (A)</td><td>Wild</td><td>Feather</td><td>16</td><td>Beneath the trees used as main communal roost</td><td>4.44 (2.07)</td><td>0.46 (0.26)</td><td>0.50 (0.30)</td></tr><tr><td>Bolivia</td><td>Omereque (B)</td><td>Wild</td><td>Feather</td><td>14</td><td>Beneath the cliffs with breeding colonies</td><td>4.44 (2.07)</td><td>0.56 (0.20)</td><td>0.58 (0.18)</td></tr><tr><td>Bolivia</td><td>Río Caine (C)</td><td>Wild</td><td>Feather</td><td>13</td><td>Foraging areas of pairs with offspring close to the breeding colonies</td><td>4.33 (2.06)</td><td>0.57 (0.33)</td><td>0.54 (0.26)</td></tr><tr><td>Bolivia</td><td>Torotoro (D)</td><td>Wild</td><td>Blood</td><td>5</td><td>Local nestlings poached from a particular locality (Torotoro)</td><td>3.33 (1.32)</td><td>0.51 (0.39)</td><td>0.50 (0.26)</td></tr><tr><td>Bolivia</td><td>Río Chico (E)</td><td>Wild</td><td>Feather</td><td>27</td><td>Beneath the cliffs with breeding colonies</td><td>4.89 (2.15)</td><td>0.61 (0.24)</td><td>0.59 (0.21)</td></tr><tr><td>Bolivia</td><td>Anamal (F)</td><td>Wild</td><td>Feather</td><td>14</td><td>Beneath the cliffs with breeding colonies</td><td>4.78 (1.99)</td><td>0.60 (0.16)</td><td>0.63 (0.17)</td></tr><tr><td>Bolivia</td><td>Tomina (G)</td><td>Wild</td><td>Blood</td><td>5</td><td>Adults kept as pets, illegally trapped in foraging areas far from the breeding colonies</td><td>3.56 (1.88)</td><td>0.62 (0.34)</td><td>0.56 (0.21)</td></tr><tr><td>Bolivia</td><td>Sta. Cruz Zoo (ZOOL)</td><td>Captive</td><td>Blood</td><td>12</td><td>Zoological Park of Santa Cruz de la Sierra; Exposed to the public, not breeding; Unknown wild origin from poaching</td><td>4.00 (1.41)</td><td>0.62 (0.22)</td><td>0.54 (0.19)</td></tr><tr><td>Bolivia</td><td>Cochabamba (CCHA)</td><td>Captive</td><td>Blood</td><td>12</td><td>Private owner in Cochabamba; Mostly poached nestlings, not reproducing in captivity</td><td>1.44 (0.53)</td><td>0.44 (0.53)</td><td>0.22 (0.26)</td></tr><tr><td>Spain</td><td>Loro Parque (LPQU)</td><td>Captive</td><td>Blood</td><td>6</td><td>Individuals legally purchased at Loro Parque, a zoological park in Santa Cruz de Tenerife, Canary Islands</td><td>5.00 (2.83)</td><td>0.62 (0.26)</td><td>0.61 (0.22)</td></tr><tr><td>Spain</td><td>Palmitos Park (PALM)</td><td>Captive</td><td>Blood</td><td>1</td><td>Individual legally purchased at Palmitos Park, a zoological park in Gran Canaria, Canary Islands</td><td>3.44 (1.33)</td><td>0.72 (0.38)</td><td>0.54 (0.28)</td></tr><tr><td>Spain</td><td>Málaga (LESL)</td><td>Captive</td><td>Feather/blood</td><td>21</td><td>Private collection breeding in captivity; Originated from six wild macaws internationally traded and legally purchased 30 years ago in England</td><td>3.22 (1.39)</td><td>0.63 (0.28)</td><td>0.49 (0.21)</td></tr></tbody></table>

of alleles (3.22 ± 1.39) (Table 2). Only six private alleles were found in both wild (W1 and W2) and captive (C2 and C3) genetic clusters (Table S4).

The results of the analysis with BOTTLENECK suggested historical population contraction events in populations W3 and W4 only when assuming an infinite allele model (IAM; Table 4). No evidence of bottlenecks was found using the two-phase model (TPM), stepwise-mutation model (SMM) or the mode-shift test, although a significant value for heterozygote deficiency was obtained for population W3 using TPM (Table 4). The M-ratio test consistently suggests population contractions (values of M < Mc) in all clusters considering all pre-bottleneck *N*<sub>e</sub> values (Table 4).

**Migration rates, relatedness and gene flow.** Migration rates (*m*) among genetic clusters were generally low, with a global mean value of 0.056 (ranging from 0.016 to 0.192) (Table 5, Supplementary Fig. S4). Moderate values were obtained only for population W3, with a mean value of 0.130 ± 0.063. Assignment tests implemented in GENECLASS2 identified only 3 potential migrants with a *p*-value < 0.01. One migrant from population W2 was found in populations W1 and W4, and one migrant from W4 was found in W2.

Results from the 2MOD analysis in wild macaws supported a gene flow-drift equilibrium model over a drift-alone model [p (gene flow) = 0.969]. The cluster W1 showed the largest identity by descent value (F-value = 0.104) under this model and the lowest estimates of immigrants per generation (*M* = 4.10), which can be inferred as the product of drift given its higher geographic isolation. Different F-values and immigrants per generation were estimated for the other three populations, namely W2 (F-value = 0.090; *M* = 5.06), W3 (F-value = 0.034; *M* = 13.38) and W4 (F-value = 0.048; *M* = 9.92).
<table><caption>**Table 4.** Results of the bottleneck analysis. P-values of the one-tail Wilcoxon test for heterozygote excess are shown for the Two-Phase Model (TPM), Stepwise Mutation Model (SMM) and Infinite Allele Model (IAM). For the Mode-shift test, modes obtained for each population are indicated. Values of the observed M-ratio (M) and critical ratio (Mc) were estimated for three values of pre-bottleneck θ that correspond to N<sub>e</sub> values of 50, 500 and 5000, respectively. Values in bold suggest historic bottleneck events. *Significant p-values were obtained for heterozygote deficiency (p < 0.05).</caption><thead><tr><th colspan="4">Bottleneck</th><th rowspan="2">Mode-shift</th><th colspan="4">M-ratio (M<sub>e</sub>)</th></tr><tr><th>Genetic cluster</th><th>TPM P-values</th><th>SMM P-values</th><th>IAM P-values</th><th>M</th><th>θ=0.1</th><th>θ=1</th><th>θ=10</th></tr></thead><tbody><tr><td>W1</td><td>0.180</td><td>0.180</td><td>0.410</td><td>Normal L-shaped</td><td>0.421</td><td><strong>0.763</strong></td><td><strong>0.693</strong></td><td><strong>0.590</strong></td></tr><tr><td>W2</td><td>0.545</td><td>0.633</td><td>0.082</td><td>Normal L-shaped</td><td>0.528</td><td><strong>0.767</strong></td><td><strong>0.695</strong></td><td><strong>0.575</strong></td></tr><tr><td>W3</td><td>0.936</td><td>0.986*</td><td><strong>0.009</strong></td><td>Normal L-shaped</td><td>0.265</td><td><strong>0.767</strong></td><td><strong>0.706</strong></td><td><strong>0.669</strong></td></tr><tr><td>W4</td><td>0.248</td><td>0.500</td><td><strong>0.005</strong></td><td>Normal L-shaped</td><td>0.272</td><td><strong>0.761</strong></td><td><strong>0.698</strong></td><td><strong>0.605</strong></td></tr></tbody></table>

<table><caption>**Table 5.** Contemporary gene flow (m, migration rate, results from BAYESASS) estimated between the four wild genetic clusters of the red-fronted macaw in the wild. Standard deviation of the marginal posterior distribution for each estimate is noted in parentheses. Migration rates indicate the fraction of individuals in the population of destination that are migrants derived from the source population (per generation).</caption><thead><tr><th>Population</th><th>To</th><th></th><th></th><th></th></tr><tr><th>From</th><th>W1</th><th>W2</th><th>W3</th><th>W4</th></tr></thead><tbody><tr><td>W1</td><td>0.8812 (0.0477)</td><td>0.0248 (0.0251)</td><td>0.0654 (0.0394)</td><td>0.0286(0.0280)</td></tr><tr><td>W2</td><td>0.0314 (0.0290)</td><td>0.7293 (0.0542)</td><td>0.1920 (0.0491)</td><td>0.0473(0.0413)</td></tr><tr><td>W3</td><td>0.0348 (0.0228)</td><td>0.0155 (0.0155)</td><td>0.9281 (0.0274)</td><td>0.0216(0.0173)</td></tr><tr><td>W4</td><td>0.0288 (0.0270)</td><td>0.0495 (0.0509)</td><td>0.1311 (0.0446)</td><td>0.7907(0.0565)</td></tr></tbody></table>

The cluster W1 showed the highest relatedness values (0.25 ± 0.24) among wild samples (Supplementary Fig. S5, Appendix S2). The highest values of *r* in captive groups were obtained for C1 (0.17 ± 0.25) and C3 (0.39 ± 0.22). The remaining wild and captive groups have mean *r* values ranging from -0.03 ± 0.24 (W4) to 0.10 ± 0.24 (W2) (Supplementary Fig. S5, Appendix S2). Estimates of effective population size (N<sub>e</sub>) for each population group were 57 (CI = 14-inf) for W1, 105 (CI = 17-inf) for W2, 81 (CI = 35-2698) for W3 and 38 (CI = 16-inf) for W4. The value of N<sub>e</sub> considering all individuals as a single population was 87 (CI = 52-188).

The analysis of IBD showed a tendency of lower genetic differences at higher geographic proximity, although the correlation between genetic and geographic distances was not significant (Mantel test; Z = 109.12, *r* = 0.55, P = 0.15). The RMA regression line for F<sub>ST</sub> explained 28.14% of the variation (Supplementary Fig. S6a). The results were also not significant when the population further south (A-W1) was excluded from the analysis (Mantel test; Z = 42.19, *r* = 0.08, P = 0.86), where the RMA explained only 3.6% of the variation (Supplementary Fig. S6b).

**Breeding colonies, flock size and diet.** Overall, we recorded the characteristics of the 42 breeding colonies located within the four genetic clusters (Supplementary Table S5), plus one colony from a population nuclei not sampled for genetic analyses. All sampled colonies were located on rocky cliffs of variable size and orientation along the main rivers at elevations ranging from 1300 to 2600 m a.s.l. (Supplementary Table S5). Univariate comparisons showed that elevation of the breeding colonies differed between genetic clusters, with colonies within genetic cluster W1 located at the highest elevations and those in the genetic cluster W4 at the lowest elevations (Supplementary Table S5). Length and width of the nesting cliffs, their orientation and distance to the nearest river did not differ between genetic clusters (Supplementary Table S5).

Maximum flock size in each breeding and non-breeding area was higher than the number of breeding individuals in each breeding area (Fig. 1a). Non-breeding areas were located at variable distances from the nearest breeding areas, and often at intermediate distances between breeding areas corresponding to different genetic clusters. Maximum flock size in non-breeding areas were also generally higher than those in the nearest breeding area and genetic cluster (Fig. 1a).

The foraging activity of 197 macaw flocks comprising 2180 individuals was recorded in the breeding areas, while 23 foraging flocks comprising 361 macaws were observed in the non-breeding areas (Table 6). The size of foraging flocks in the breeding areas did not differ between genetic clusters (Kruskal-Wallis test, H = 3.69, df = 3, P = 0.29, n = 177), or between breeding areas (mean ± SD = 11.1 ± 17.0, n = 197, pooling all genetic clusters plus the breeding area not sampled for genetic samples) and non-breeding areas (15.7 ± 17.8, n = 23) (Kruskal-Wallis test, H = 3.36, df = 1, P = 0.07, n = 220).

A total of 19 plant species were recorded being consumed by red-fronted macaws (Table 6). Diet composition showed no clear differences among genetic clusters, mainly because three vegetal species, namely Palo Borracho (*Jatropha hieronymi*, Euphorbiaceae), Soto (*Schinopsis marginata*, Anacardiaceae) and cultivated maize (*Zea mays*, Poaceae), were dominantly exploited by flocks and individuals in all areas (Table 6). Peanut (*Arachis hypogaea*) crops were also exploited frequently in all clusters (especially in W1) except cluster W4. The
<table><caption>**Table 6.** Diet composition of the red-fronted macaw in each genetic cluster, and pooled breeding and non-breeding areas, according to flocks (F) and individuals (I). Cultivated species are shown in bold.</caption><thead><tr><th rowspan="3">Species</th><th colspan="4">Genetic cluster</th><th colspan="2">Breeding areas</th><th colspan="2">Non-breeding areas</th></tr><tr><th>W1</th><th>W2</th><th>W3</th><th>W4</th><th colspan="2">Total</th><th colspan="2">Total</th></tr><tr><th>F/I</th><th>F/I</th><th>F/I</th><th>F/I</th><th>F (%)</th><th>I (%)</th><th>F (%)</th><th>I (%)</th></tr></thead><tbody><tr><td>Jatropha hieronymi</td><td>4/14</td><td>21/139</td><td>5/36</td><td>4/18</td><td>45 (22.8)</td><td>402 (18.4)</td><td>2 (8.7)</td><td>12 (3.3)</td></tr><tr><td>Schinopsis marginata</td><td>2/8</td><td>5/17</td><td>14/166</td><td>23/260</td><td>44 (22.3)</td><td>451 (20.7)</td><td>5 (21.7)</td><td>42 (11.6)</td></tr><tr><td>Zea mays</td><td>1/2</td><td>10/69</td><td>10/213</td><td>6/212</td><td>27 (13.7)</td><td>496 (22.8)</td><td>10 (43.5)</td><td>246 (68.1)</td></tr><tr><td>Prosopis kuntzei</td><td></td><td>3/30</td><td>17/69</td><td></td><td>20 (10.2)</td><td>99 (4.5)</td><td></td><td></td></tr><tr><td>Arachis hypogaea</td><td>4/92</td><td>1/4</td><td>8/145</td><td></td><td>13 (6.6)</td><td>241 (11.1)</td><td>5 (21.7)</td><td>59 (16.3)</td></tr><tr><td>Prosopis alba</td><td></td><td></td><td>7/139</td><td>2/5</td><td>9 (4.6)</td><td>144 (6.6)</td><td></td><td></td></tr><tr><td>Ziziphus mistol</td><td></td><td></td><td></td><td>1/24</td><td>9 (4.6)</td><td>84 (3.9)</td><td></td><td></td></tr><tr><td>Schinus molle</td><td>1/1</td><td>1/4</td><td>6/78</td><td></td><td>8 (4.1)</td><td>83 (3.8)</td><td></td><td></td></tr><tr><td>Anadenanthera colubrina</td><td></td><td>1/6</td><td></td><td>4/17</td><td>5 (2.5)</td><td>23 (1.1)</td><td></td><td></td></tr><tr><td>Loxopterygium grisebachii</td><td></td><td>2/11</td><td></td><td>2/12</td><td>4 (2.0)</td><td>23 (1.1)</td><td></td><td></td></tr><tr><td>Cnidoscolus sp.</td><td></td><td></td><td>3/11</td><td></td><td>4 (2.0)</td><td>23 (1.1)</td><td></td><td></td></tr><tr><td>Cenchrus sp.</td><td></td><td>2/13</td><td></td><td></td><td>2 (1.0)</td><td>13 (0.6)</td><td></td><td></td></tr><tr><td>Neoraimondia herzogiana</td><td></td><td>1/11</td><td></td><td>1/2</td><td>2 (1.0)</td><td>13 (0.6)</td><td></td><td></td></tr><tr><td>Anisocapparis speciosa</td><td></td><td></td><td>1/22</td><td></td><td>1 (0.5)</td><td>22 (1.0)</td><td></td><td></td></tr><tr><td>Aspidosperma quebracho-blanco</td><td></td><td></td><td></td><td></td><td></td><td></td><td>1 (4.3)</td><td>2 (0.6)</td></tr><tr><td>Celtis ehrenbergiana</td><td></td><td></td><td></td><td>1/6</td><td>1 (0.5)</td><td>6 (0.3)</td><td></td><td></td></tr><tr><td>Parkinsonia praecox</td><td></td><td>1/3</td><td></td><td></td><td>1 (0.5)</td><td>3 (0.1)</td><td></td><td></td></tr><tr><td>Selaginella sellowii</td><td></td><td>1/42</td><td></td><td></td><td>1 (0.5)</td><td>42 (1.9)</td><td></td><td></td></tr><tr><td>Senegalia visco</td><td></td><td></td><td></td><td>1/12</td><td>1 (0.5)</td><td>12 (0.6)</td><td></td><td></td></tr><tr><td>Total</td><td>12/117</td><td>49/349</td><td>71/879</td><td>45/568</td><td>197 (100)</td><td>2180 (100)</td><td>23 (100)</td><td>361 (100)</td></tr><tr><td>n plant species</td><td>5</td><td>12</td><td>9</td><td>10</td><td>18</td><td></td><td>5</td><td></td></tr></tbody></table>

exploitation of these four vegetal species accounts for about 52–92% of foraging flocks and 64–99% of foraging individuals in the areas corresponding to each genetic cluster. All the remaining vegetal species sum > 10.2% of flocks or > 6.6% of foraging individuals in the breeding areas. Foraging flocks outside the breeding areas were recorded feeding on the same four plant species, although the sample size was lower than in the breeding areas (Table 6). One species, Quebracho Blanco (*Aspidosperma quebracho-blanco*, Apocynaceae), was infrequently consumed in the non-breeding areas and not consumed in the breeding areas. The exploitation of crops was lower in the breeding areas (20.3% of flocks and 33.8% of individuals) than in the non-breeding areas (65.2% of flocks and 84.5% of individuals) (Fisher exact test, both P < 0.0001). The size of flocks exploiting crops was similar between breeding and non-breeding areas (Mann–Whitney U-test, z = 1.09, P = 0.27). Pooling breeding and non-breeding areas and plant species, the size of flocks feeding on crops (mean ± SD = 18.9 ± 24.9, n = 55) was larger than that of flocks feeding on non-cultivated plants (9.1 ± 12.8, n = 165) (z = 2.96, P = 0.003).

Discussion

**Genetic structure and diversity.** In this study, we found evidence for a fine-scale genetic structuring across the whole population of the red-fronted macaw. Four genetic clusters were defined, corresponding to different breeding colonies spatially grouped along main rivers. The genetic structure over a much smaller spatial scale than that observed for other large parrot species with high dispersal ability³¹⁻³³ is unexpected given the short distances between population nuclei and the great dispersal potential of the red-fronted macaw²⁸⁻³⁰.

Our genetic assay successfully identified a total of 94 wild individuals, which represent about 10% of the extant world population estimated in the last published survey³⁰, when our genetic survey was also conducted. Despite the successful cross-species transfer of the nine microsatellites markers selected for this study, we cannot exclude a potential effect of ascertainment bias (i.e. microsatellite repeats tend to be longer and more polymorphic in the source species than in the new target species)³⁴. Therefore, the comparison of our microsatellite data with results obtained for other species should be done cautiously. PIC values indicated a good informative level of these microsatellites, including five highly informative (PIC > 0.5), three reasonably informative (0.5 > PIC > 0.25) and only one slightly informative (PIC < 0.25). The cumulative probability of identity of our microsatellite data set was less than 0.01, as recommended for population studies using noninvasive sampling³⁵. The collection of moulted feathers in the colonies and their close surroundings was relatively precise in assigning individuals to their actual population nuclei of breeding and natal origin, although this could only be ensured by sampling nestlings in their colonies. While the genetic heterogeneity of the whole population may reflect biologically relevant differences between population nuclei, low gene exchanges among sampling sites were also detected, as shown by clustering analysis, mean assignment values and estimates of migration rates. Therefore, the apparently low gene flow among genetic clusters may simply indicate the inclusion in the analysis of a few transient individuals moving from
adjacent colonies, rather than actual genetic intermixing across generations that would have resulted in a lack of genetic structure¹⁹,³⁶. The genetic clusters grouped nearby breeding colonies across geographically continuous cliffs along major water courses, although one of the clusters (W3) included discontinuous breeding areas separated by about 100 km. This suggests that macaws may not necessarily disperse to the nearest colonies over more distant ones. This may also be the consequence of population fragmentation, as several distinct genetic clusters were located within shorter distances of each other (e.g. W2–W4) compared to population nuclei corresponding to the same genetic cluster (e.g. W3). The effect of geographic isolation on genetic isolation appears to be more evident for the southernmost and geographically isolated genetic cluster (W1), which was supported by high assignment values. This was also supported by the lowest number of breeding pairs, a high proportion of non-breeding individuals³⁰, and a low effective population size in this population nucleus. Furthermore, while coalescent-based simulations supported a model of drift-gene flow equilibrium for the whole population, the largest identity by descent value, the lowest estimates of contemporary gene flow, and high inbreeding and relatedness indices supported the effects of genetic erosion in the southernmost genetic cluster. These processes can exert a clear influence on a reduction in effective population size and contribute to unequal genetic erosion among population nuclei³⁷,³⁸. While a complete divergence among populations should translate into pronounced genetic differences, many private alleles and highly distinct gene clusters, a secondary contact of populations with a rather recent common ancestry should translate to weak differentiation and some level of gene flow³⁹,⁴⁰. This generally occurs because even a small number of individual exchanges may prompt genetic homogenisation¹⁹. Therefore, the low level of private allelic richness in each genetic cluster, together with some degree of admixture, suggests that the current genetic structure is most likely not the result of genetic fragmentation from a single homogeneous genetic unit in the past. This is supported by the inclusion in the same genetic cluster of breeding colonies separated by relatively large distance. The genetic differentiation observed is only supported by clustering analysis with sample location priors, which may suggest a weak population structure. However, the clustering algorithm with sample location priors assumes that the assignment probabilities to a population of origin vary among locations, not being biased to detect population structure where it does not exist⁴¹.

Results support that genetic diversity has been probably more affected by historical events than contemporary ones. The lack of a clear significant influence of bottlenecks on heterozygosity-excess tests, except in particular clusters, further indicates a population structure that is not severely affected by genetic diversity loss due to recent demographic processes⁴². On the contrary, the strong evidence of bottlenecks in M-ratio tests clearly support historical (distant past) population contractions eroding genetic diversity across the whole population⁴³,⁴⁴. The M-ratio can detect population size reductions up to approximately 125 generations if the population rebounded quickly after a severe bottleneck event, and up to 500 generations if the population size remains reduced⁴⁵. This suggests that the genetic structure currently observed may likely not be a consequence of genetic erosion in the long-term, because even a reduced gene flow from individuals moving between clusters could have contributed to diluting any structure subsequently, at least during the historical time scale than can be inferred from the study of nuclear markers. Given the approximate generation length estimated for this species (12.7 years according to the IUCN⁴⁶), the historic bottlenecks coincided with drastic habitat fragmentation and transformation in the inter-Andean dry forest of Bolivia by humans during the last Holocene (4000 cal BP—Present), rather than with climatic conditions that were relatively stable during this period⁴⁷⁻⁴⁹. Habitat transformation by humans began 3000 years ago and was especially intense during the expansion of the Inca Empire in the fifteenth century, when the inter-Andean valleys were a main source of maize, pasture for llama (*Lama glama*) used for transport, and firewood⁴⁷,⁵⁰,⁵¹. During this period, the persecution of macaws because of their impact on maize crops, and their capture for trade as "prestige goods" and for colourful feathers used in decorative objects and as tributes⁵²⁻⁵⁶, could have contributed to the historic bottlenecks. Rather than due to human impact, older bottlenecks should be linked to geo-climatic events, which could be inferred by future analysis of mitochondrial DNA.

Overall, the genetic diversity was higher in wild macaws than in captive-bred ones in Spain, but was similar to that observed in individuals maintained in captivity in Bolivia. This was expected, because wild-caught macaws maintained in captivity in Bolivia were captured over the whole range of the species, and founder events should have been limited. Since these individuals do not reproduce in captivity in Bolivia, they cannot be affected by additional inbreeding due to artificial pairing between close relatives, as often occurs in captive-breeding groups⁵⁷,⁵⁸. In contrast, diversity indices in the captive groups in Spain were particularly low, which suggest that the founder effect due to introduction of only a few individuals 30 years ago in the pet market resulted in a reduced diversity and higher inbreeding levels. In particular, the continued breeding between close relatives in the captive group in Malaga promoted the lowest genetic diversity and its classification in a single genetic cluster (C3), whose origin in wild populations cannot be identified among the sampled nuclei. This population shows the lowest allelic richness value but a high heterozygosity value, which is expected in the first generations after a founder event with a reduced number of individuals and absence of random mating⁵⁹,⁶⁰. Whether this cluster corresponds to an unsampled population in the wild or emerged as the result of artificial cross-pairing between relatives, it reveals that genetic identity can be maintained even under conditions of high inbreeding. On the contrary, the Bayesian clustering analysis classified captive individuals from a private owner in Cochabamba and those from Loro Parque as corresponding to the wild cluster W4. The captive group in the Zoological Park of Santa Cruz de la Sierra showed a mixed ancestry from two of the genetic clusters in the wild, which indicates that individuals from these clusters were simply maintained together. Our microsatellite panel allowing differentiation and assignment of both wild and captive groups could be a powerful tool for conservation and management actions. Further development of new nuclear markers and the analysis of mitochondrial markers are necessary to improve individual assignment tests and to deepen the knowledge on the diversity and structure of red-fronted macaw populations.
**Drivers of population genetic structure.** Genetic structure generally arises as a consequence of species-specific life history traits and their interactions with environmental features like habitat fragmentation and heterogeneity<sup>2,61</sup>, and population characteristics like density and demography<sup>62</sup>. Dispersal patterns have been highlighted to greatly contribute to the distribution of genotypes across geographical areas and distribution ranges<sup>1</sup>. However, even highly mobile terrestrial birds can show low levels of gene flow leading to strong genetic structure<sup>8</sup>. In general, parrots are generalist plant consumers able to make daily, seasonal, and altitudinal long-distance movements by tracking the abundance or preference of food resources<sup>63</sup>. Red-fronted macaws disperse over large areas through long-distance daily flights, including altitudinal movements during the breeding season, and longer seasonal movements to occupy distant foraging areas during the non-breeding season<sup>28–30</sup>. Distances between breeding nuclei forming the genetic clusters observed in the wild population were relatively short for precluding the genetic intermixing of individuals of this vagile species<sup>29,30</sup>. In fact, the analysis of isolation by distance showed a tendency of lower genetic differences at higher geographic proximity, although this was very influenced by the effect of the southernmost isolated genetic cluster. The extent of the altitudinal movements<sup>30</sup> and the lack of high mountains or unsuitable habitat between genetic clusters indicate that isolation by distance or physical barriers are not important mechanisms limiting gene flow leading to the observed genetic structure. This is further supported by the use of non-breeding areas by flocks larger than those observed in each respectively nearest breeding area or genetic cluster. This suggests the intermixing of individuals from different population nuclei and genetic clusters during temporary associations in large flocks at non-breeding areas, mainly to exploit maize and peanut crops<sup>28–30</sup>. This intermixing should be confirmed by future genetic identification of individuals foraging and communally roosting in each non-breeding area, which would be useful to determine the importance of foraging and roosting sites for each genetic cluster.

Other studies have described a similarly unexpected fine-scale genetic structure not related to dispersal capabilities, but to a combination of ecological, behavioural and/or evolutionary mechanisms¹. Among drivers of population genetic structure, landscape and ecological features can be major barriers to gene flow between populations⁶⁴,⁶⁵. This mechanism of isolation by adaptation to specific local conditions does not seem to influence the genetic heterogeneity of the red-fronted macaw population. This is based on the lack of important differences in the location and physical features of the cliffs with breeding colonies and their close surroundings in each genetic cluster. Only altitude of the colonies differed between genetic clusters, although the range of variation is lower than that of the daily and altitudinal movements of macaws³⁰. This indicates an effect of the location of cliffs available for colonial nesting in the geographic location of genetic clusters, rather than actual ecological adaptation leading to genetic differentiation. However, among the nuclei not sampled for genetic analysis was a small population of red-fronted macaw nesting on palms⁶⁶, which constitutes an exception that deserves future research for its implications on potential genetic identity associated with nesting habits. In addition, foraging habitat did not differ between population nuclei, and individuals from each particular genetic cluster can extensively move to exploit distant regional and seasonal resources²⁹,³⁰,⁶⁷. In fact, diet composition showed no differences among genetic clusters, as four vegetal species were dominantly exploited across genetic clusters and non-breeding areas throughout the year, while a variety of food species are exploited seasonally at lower frequencies²⁸,⁶⁷. Differences in the frequency of different plants in the diet were even greater between breeding and non-breeding areas than among the breeding areas comprising the genetic clusters, mainly due to the primary exploitation of crops by large flocks in the non-breeding areas. Published models on foraging and habitat selection showed preference for humanized areas (degraded forest patches with crops), but not affected by densities of houses and livestock as proxies of human presence and disturbance³⁰. In addition, this species is relatively tolerant in terms of human presence, since it frequently nests and forages in very accessible places and agricultural areas with constant human presence. Therefore, the ecology of macaws in each genetic cluster, as a filter to dispersal and effective interchange between population nuclei, does not support the hypothesis that adaptations to specific local conditions (affected or not by human activities) would reduce performance of dispersers elsewhere.

In the absence of geographical and ecological barriers, isolation by socio-cultural and behavioural factors arises as a reliable mechanism driving fine-scale genetic structure in highly social species⁶⁸. In this context, the spatial distribution of breeding populations is an important social factor in shaping the patterns of genetic diversity throughout a species' range⁶⁹,⁷⁰, often associated with and maintained by coloniality, natal or breeding philopatry, and coordinated dispersal of relatives⁷¹. Several highly vagile and colonial species are faithful to their natal area, which may determine strong genetic structure over small spatial scales despite large-scale movements⁸,⁷²,⁷³. The red-fronted macaw nests in colonies that are repeatedly used across years²⁸,³⁰,⁷⁴, which may favour a patchy distribution of suitable nesting habitat and potential philopatric behaviour of breeding pairs, as is common among parrots³²,⁷⁵. Social imprinting to natal colonies may also reinforce philopatry-related genetic structure³², but it may act to the detriment of genetic variability by promoting inbreeding⁷⁶. As occurs in other long-lived and highly social species⁸,⁷⁷, red-fronted macaws from different genetic nuclei can likely flock together in foraging areas and roosting sites used across daily, seasonal and annual long-distance movements²⁸–³⁰. The lack of actual genetic intermixing thus arises despite possible intermixing of flocks from different genetic clusters in non-breeding areas used temporarily, which indicates very limited effective dispersal leading to recruitment into non-natal genetic clusters. This can arise by individual recognition within social groups strongly attached to natal and breeding colonies in this species, which may be achieved through complex organisation and behaviour facilitated by informative vocalisations⁷⁸ and dialects common among parrots¹⁶,¹⁷,⁷⁹.

Evidence of isolation by social behaviour has been suggested in bird species with complex societies, including cooperative breeding and lekking mating systems⁷,⁷¹. A combination of strong natal philopatry, close bonds among group members sharing social identity, within-group reproductive skew and kin-cooperation could provide the strong group stability behind pronounced genetic structure observed in these species⁷,⁸,⁶⁸,⁷¹. A similar combination of factors may concur to explain the genetic structure in the red-fronted macaw irrespective of the
potential loss of genetic diversity in particular genetic clusters due to population decline and inbreeding. Few studies have considered this mechanism to explain the unexpected fine-scale genetic structure despite the high mobility of parrots. For instance, social barriers could influence the unexpected fine-scale genetic structure of the cooperative-breeding El Oro parakeet (*Pyrrhura orcesi*)<sup>21</sup>, as complex social organisation in birds can drive decisions about dispersal from family flocks, and the skewed acceptance of dispersers into other groups<sup>7,71</sup>.

Remarkably, the breeding pairs (about 100 in the last census) represent a small proportion (c. 20%) of the whole red-fronted macaw population<sup>30</sup>, as is the case of other colonial cliff-nesting macaw species<sup>80</sup>, which may be indicative of restricted breeding opportunities linked to unfavourable environmental conditions and delayed breeding<sup>81-83</sup>. A non-mutually exclusive hypothesis states that, regardless of environmental limitations, a high proportion of non-breeding individuals can be a consequence of the within-group reproductive skew necessary to maintain the genetic identity of each cluster without losing genetic diversity. In fact, a high proportion of non-breeding individuals is typical of long-lived species with complex societies and pronounced genetic structure, where access to reproduction can depend on familiar and social factors<sup>8,71,82,84</sup>. Therefore, a high proportion of non-breeding individuals in long-lived species with no cooperative breeding could be a species-specific trait evolved to attain enough genetic variability allowing specific pairings among group members of extended family networks, which deserves further research. Inbreeding depression due to artificial pairing between close relatives in captivity represents the opposite process, as it can lead to a specific genetic signature associated with a patent loss of genetic diversity (e.g. cluster C3). More research on genetic diversity and structure of wild and captive populations is required to support this hypothesis, since high inbreeding levels can introduce biased inferences in clustering methods<sup>85,86</sup>.

**Concluding remarks and implications for conservation.** Evolutionary history under isolation has been argued to be a major driver of genetic diversity and effective population size especially in rare and threatened species<sup>38</sup> with geographically-restricted ranges<sup>87</sup>. Factors generally promoting these kinds of genetic and population patterns include geo-climatic events like glaciations isolating small populations in geographically-restricted refugia and habitats<sup>88,89</sup>, as well as the founder effect and extreme population isolation in oceanic islands<sup>90</sup>. The red-fronted macaw adjusts to this evolutionary pattern, as it evolved in isolation in the tropical inter-Andean dry-forest since the rapid uplift that occurred about 10 million years ago in this sector of the Andes range<sup>91</sup>. This event meant the isolation of the relatively small extension of the dry-valleys of Bolivia from the Gran Chaco region, and it was the origin of the high level of plant endemism present in the region<sup>92,93</sup> with which the red-fronted macaw coevolved<sup>67,94</sup>. The genetic and population characteristics (including the high non-breeder proportion) currently observed in the global population of the red-fronted macaw represent intrinsic features that have evolved as adaptations increasing fitness and population performance under these particular eco-evolutionary conditions. If this hypothesis can be demonstrated as true, this would imply a specific attention on the singular genetic and population structure of this species as key targets for its conservation.

Evidence for a fine-scale structuring in four relatively independent genetic clusters has important implications in the conservation of the whole population of the red-fronted macaw. This species currently shows variable levels of genetic diversity depending on the genetic cluster. However, there is no clear evidence of strong genetic erosion in the population as a whole in the last decades, but rather in the last centuries or millennia. Genetic diversity, reflected in heterozygosity values, is lower than that observed for widely distributed parrots<sup>95</sup>, but similar or higher than those reported for endangered parrot species with restricted distribution ranges or recent population declines<sup>96-98</sup>. However, these results should be interpreted with caution when different markers were used to estimate genetic diversity indices<sup>99</sup>. In addition, low heterozygosity is not always derived from a reduction in effective population size<sup>60</sup>, as demonstrated by the relatively high heterozygosity of the captive cluster C3 despite high actual inbreeding and low allelic richness.

Recent declines due to habitat transformation and human-mediated mortality by persecution of adult birds in agricultural areas and nestling poaching for the local pet trade<sup>30</sup> have reduced the population size, and could have contributed to the reduction of genetic diversity in some breeding nuclei. The persecution outside breeding areas may further exert an important effect in the reduction of the total and non-breeding population buffering breeder mortality. Of concern is the loss of breeding pairs by direct persecution in the colonies and their surroundings, and by alterations in the nesting habitats, which may exert especially detrimental effects on the effective population size. This is based on the expected concerning effects on population viability and dynamics from adult mortality in long-lived species with deferred maturity and low reproductive rates, as in large macaws<sup>80,100</sup>. In addition, the impact on breeders may greatly reduce genetic diversity under the hypothesis that they harbour most of it as enhanced by highly selective pairings in each genetic cluster. Future investigation should be directed to confirm or reject this hypothesis.

This study emphasises that conservation efforts for the Critically Endangered red-fronted macaw should be focussed on multiple fronts<sup>30</sup>, but especially on the particularly more detrimental threats in each genetic cluster as independent conservation units<sup>101,102</sup>. The restricted range composed of relatively homogeneous habitats may increase extinction risk for the whole population more rapidly through environmental correlation<sup>103</sup> than due to genetic depression on each particular cluster<sup>26,104</sup>. Therefore, to implement a global conservation strategy preserving these evolutionary units as components of the overall genetic integrity, a comprehensive evaluation is required on the key habitats, home ranges and availability of food resources in each genetic cluster. Special attention should be directed to avoid nestling poaching for the local pet trade and persecution of adults, as key threats with a high impact shared by all population nuclei<sup>30</sup>. Finally, our genetic approach is sufficiently reliable to serve as a reference for future estimations on genetic diversity and potential current or future demographic bottlenecks in each genetic cluster. Future genetic analysis of the three wild breeding nuclei not sampled in this study will serve to determine the potential existence of additional clusters with a singular genetic identity. This
will also help to better identify the origin of captive individuals, and those admitted in recovery centres after seizure from illegal trade. The assignment of captive individuals to each genetic cluster may be useful to form suitable captive-breeding nuclei for future potential reinforcement programs and reintroduction of individuals in their corresponding genetic nuclei in the wild.

## Materials and methods

**Study area and study species.** The red-fronted macaw is a colonial, cliff-nesting species endemic to the inter-Andean valleys of Bolivia. This is a wide, rugged and dry area located on the eastern slopes of the central Bolivian Andes at altitudes from 900 to 3500 m, in the departments of Santa Cruz, Cochabamba, Chuquisaca, and Potosi³⁰. The habitat is dominated by tropical dry forest with a high proportion of endemism, transformed by long-term human activities to thorn and cactus scrub with scattered trees in hillsides and riverine forest and crops in valley bottoms⁹².

The small population size, reduced distribution range, and recent decline led to the listing of the species as “Critically Endangered” according to the IUCN Red List⁴⁶. Population estimates varied from 5000 individuals in the 1980s to 2000–4000 or as few as 700–800 individuals and less than 100 breeding pairs in recent years³⁰,⁴⁶. Forest loss and degradation due to agriculture expansion, overgrazing and firewood cutting, and poaching of nestlings for local pets, are considered the major threats to the species³⁰,⁴⁶.

**Fieldwork.** This genetic approach benefits from previous fieldwork conducted for assessing the global distribution and population size of the species, its seasonal movements, diet and foraging habits as detailed in our previous publications³⁰,⁶⁷,⁹⁴. Briefly, all known breeding colonies and another found for first time, as well as communal roosting sites, were simultaneously monitored in 2011, allowing us to estimate the global population size (c. 800 individuals), with c. 100 pairs breeding in 8 discrete areas (summing 1298 km², 114–300 km² each, see Fig. 1a), and a non-breeding population reaching c. 80% of the total³⁰. To characterise the breeding colonies, we recorded the nesting substrate, height, width (in m), orientation (transformed to radians for statistical analysis), altitude (in m above sea level), and distance (in m) to the nearest river of the cliffs holding breeding colonies³⁰. Breeding nuclei are located in river cliffs. The population size was much larger in the recent past³⁰, and thus in the last decades some breeding cliffs have been abandoned. For instance, in the first more complete census of the species, it had already disappeared as breeder of six cliff areas, while it was found breeding in 12 new cliffs where its reproductive presence was not known before³⁰. This species nests in a wide altitude range, where we found another 81 cliffs not occupied by the species, while in 41 of them nested up four other parrot species that usually nest coexisting with the red-fronted macaw in the same cliffs. Therefore, we can assume that at least a proportion of these cliffs could be suitable for macaws according to their features, similar to those of used cliffs. Therefore, the availability of cliffs is apparently not a limiting factor, although there is no more data on breeding areas than known after intensive searching by us, other research teams, and personnel of local governments, especially in protected areas.

Seasonal movements were studied in 2011–2012 (588 flocks recorded), showing changes in flock size and movements of macaws between 953 and 3094 m a.s.l. that increased after the breeding season to occupy six non-breeding foraging areas (summing 1329 km², each range 61–459 km², see Fig. 1a)³⁰. The foraging ecology and diet of the species was studied year-round during 2011–2013, through roadside surveys (totalling 6823 km) conducted during 153 fieldwork days in eight expeditions, which allowed us to record 220 foraging flocks (summing c. 2500 individuals) and the plant species they were consuming⁶⁷,⁹⁴.

Samples of blood and feathers were collected from both wild and captive individuals in Bolivia and from captive individuals in Spain (Table 3). The sampling area covered the whole distribution of the species in the wild, although colonies from a few areas were not sampled due to very difficult access (Fig. 1). Field surveys were optimised in space to ensure the sampling of individuals from previously undetected populations³⁰. A total of 114 wing and tail feathers were collected from five areas (Table 3) during field surveys conducted in 2012. All feathers were sampled at the end of the breeding period beneath the cliffs with breeding colonies and their surroundings, and in communal roosts close to the colonies (Table 3). Blood samples were obtained from five nestlings poached in a breeding area (code D in Table 3, Fig. 1) and five adults recently captured in a non-breeding area (code G in Table 3, Fig. 1).

Regarding the captive populations, blood samples were obtained in 2012 from the Zoo of Santa Cruz de la Sierra (ZOOL, *n* = 12) and from a private owner in Cochamamba (COCH, *n* = 12) in Bolivia. These macaws were captured within the last ten years from the wild population (pers. comm. from the keepers). Feathers (*n* = 36) and blood (*n* = 37) samples from captive individuals in Spain were obtained from different private owners (Table 3). All captive macaws in Malaga originated from six individuals from the pet trade 30 years ago in England (Lesley Munns, pers. comm.), while the rest were purchased at two public zoos (Loro Parque and Palmitos Park).

**Microsatellite genotyping and individual identification.** Genomic DNA was extracted from blood and feather samples. All individuals were genotyped using a microsatellite panel of 9 polymorphic loci (UnaCT21, UnaCT32, UnaCT43, UnaCT74, AgGT17, AgGT21, AgGT90, MmGT057 and Peeu11) specifically selected for this study (see Supplementary Methods S1 for details; Table S2). Error rates were estimated from replicates of nine low quality DNA samples extracted from feathers. Samples were amplified two or three times (the third amplification was only performed when validation of allele sizes was needed) and only alleles with at least two successfully amplifications were included in analysis. Individuals missing four or more loci were excluded from the final data set. Probability of identity values ($P_{ID}$) for each locus were estimated using the program GIMLET 1.3.3¹⁰⁵.

To detect samples of the same individual and potential family relatives, individuals from each sampling site were screened for close genetic relatedness (i.e. total match of all alleles or presence of full-sibs) using COLONY
version 2.0.6.6<sup>106</sup>. The analysis was performed considering error rates of the data set, applying the full-likelihood method, long length of run, medium-likelihood precision, and no sibship prior, assuming a monogamous mating system and an inbreeding model for isolated populations<sup>107</sup>. Full-sib pairs with a probability > 0.90 detected after four long runs were considered related familiar sampling. This sibship reconstruction is essential to assess the quality of our data set, but we cannot exclude some potential bias in the inferences, since we do not know the birth year of individuals and we do not have family groups from any nucleus to calibrate the inference methods. Consequently, we cannot exclude that some individuals identified as full sibs may be parent-offspring. Molecular sex identification was considered as an additional criterion to assign a given consensus genotype to the same or different individuals (Supplementary Methods S1).

**Bayesian clustering analysis and population genetic differentiation.** We assessed pairwise genetic differentiation between red-fronted macaw populations with the *F*<sub>st</sub> estimator of Weir and Cockerham<sup>108</sup>, as implemented in GENALEX v.6.5<sup>109</sup>. To further explore genetic evidence for subdivision among individuals (both wild and captive), the partition of the total genetic variation was explored based on a Principal Coordinate Analysis (PCoA) in GENALEX. Further, to be able to identify the actual subpopulations and assign individuals (probabilistically) to these populations, we used Bayesian analysis implemented in the program STRUCTURE v.2.1<sup>110</sup>. We used the model of correlated allele frequencies and admixture<sup>110,111</sup>. We ran 20 replicates for each *K* in the range of 1 to 8 in order to estimate the most likely number of clusters (*K*), using all individuals. Simulations were conducted with 1 000 000 steps of the Markov chain Monte Carlo (MCMC) after a burn-in period of 100 000 iterations without and with sampling localities as priors (LOCPRIOR option) to allow detection of weaker genetic population structure<sup>41</sup>. The outputs were processed in the CLUMPAK server<sup>112</sup> to display the results in a graphical interface and to obtain assignment probabilities of individuals (*q*) to each cluster (using a MCL threshold for similarity scores of 0.90). The likelihood distributions were analysed with STRUCTURE HARVESTER<sup>113</sup>. The optimal *K* value was selected considering the following assumptions: (1) the likelihood distribution reached a maximum and began to plateau or decrease; (2) high stability of clustering patterns between runs (at least 60% of the 20 runs were similar in the primary mode); and (3) *K*<sub>max</sub> + 1 no longer identify new clusters (i.e. the genetic structure at *K*<sub>max</sub> + 1 is equal to *K*<sub>max</sub>)<sup>8,114</sup>. We also estimate the *K* value for each analysis using the method reported by Evanno et al. (2005)<sup>115</sup>. We tested a hierarchical STRUCTURE approach to search for population structure not detected at the first level of the STRUCTURE analysis<sup>8,115</sup>.

**Genetic diversity.** Diversity parameters were calculated for wild and captive populations in Bolivia, as well as for the two captive groups from Spain (Table 3). Departures from linkage disequilibrium and Hardy-Weinberg equilibrium (HWE) were tested using exact tests as implemented in GENEPOP v.4.4.2<sup>116</sup>, applying the Markov chain method with 10,000 dememorisation steps, 1000 batches and 5000 iterations/batch. Bonferroni corrections to significance values were applied to account for multiple tests. Genetic diversity (i.e. observed (*H*<sub>O</sub>) and expected heterozygosity (*H*<sub>E</sub>), and mean number of alleles per locus (*N*<sub>A</sub>) was estimated for each locus and population using GENALEX v.6.5. The program FSTAT v.2.9.4 was used to calculate allelic richness (*A*<sub>R</sub>). Polymorphism information content (PIC), a measure of the informativeness degree of a marker used as a key parameter to evaluate the ability to detect genetic variation among individuals of a population<sup>117</sup>, was calculated for all loci per population using CERVUS v.3.0.7<sup>118</sup>.

**Drift versus gene flow model.** We determined the relative contributions of drift versus gene flow across the distribution area, using the likelihood approach implemented in the program 2MOD<sup>119</sup>. Two models were compared: the drift model relates to populations that are subject to drift alone, with no influence from gene flow, while the gene flow/drift equilibrium model (referred to as the gene flow model) relates to a balance between the two forces. The drift model assumes that mutation has not strongly influenced gene frequencies such that alleles are identical by descent, and the gene flow model assumes that the mutation rate is much smaller than the immigration rate<sup>119</sup>. We carried out five independent runs to ensure convergence of the MCMC algorithm, with 1000 000 iterations and the first 10% discarded as burn-in. The probability of a model was calculated as the proportion of times that the model was supported. The number of migrants per generation (M) for each population was calculated from *F* values according to Ciofi et al.<sup>119</sup>.

**Demographic inferences, inbreeding, relatedness and drivers of genetic differentiation.** To test for possible reductions in population size, we used the program BOTTLENECK v.1.2.02<sup>120</sup> and the M-ratio model implemented in the software M_P_VAL<sup>45</sup> (details in Supplementary Methods S1).

FSTAT was used to explore the level of inbreeding in each population using the inbreeding coefficient (*F*<sub>IS</sub>). Mean relatedness within each breeding site was estimated in the program GENALEX, using Queller and Goodnight's *R* estimates<sup>121</sup>.

To estimate recent migration rates between groups (i.e., within the last *N*<sub>e</sub> generations, where *N*<sub>e</sub> is the effective population size) in each direction and rates of dispersal, we used a Bayesian approach (BAYESASS v.1.2<sup>122</sup>), and the program GENECLASS2 v.2.0<sup>123</sup>, a different approach to detect first generation migrants. See the Supplementary Methods S1 for a detailed explanation of these program settings.

To estimate the contemporary effective population size (*N*<sub>e</sub>) of the whole population, as well as for each breeding colony, we applied the linkage disequilibrium method using the program LDNE v.1.31<sup>124</sup>. The LD method provides values of the *N*<sub>e</sub> in the parental generation of the individuals analysed, but the precision of the estimates can be affected if occurred changes in population sizes in the recent past<sup>124</sup>. This program assumes random mating and excludes all alleles with frequencies lower than 0.02, which generally provides a good balance between
precision and bias with highly polymorphic microsatellite loci¹²⁵. The jack-knife procedure was selected to obtain the confidence intervals (CIs).

Patterns of isolation-by-distance (IBD) arise when population differentiation increases with increasing geographic distances, and are usually caused by local spatial dispersal. We analysed IBD by regressing pairwise estimates of *F*<sub>st</sub> against distance in kms between breeding sites¹²⁶. We used Mantel tests to test the correlation between matrices of genetic differentiation and geographic distances by 1000 permutations in IBD program v.1.52¹²⁷.

**Ethics statements.** All fieldwork and procedures, including moulted feather collection and blood sampling conducted in Bolivia were carried out in accordance with relevant guidelines and regulations to study endangered species by Viceministerio de Medio Ambiente, Biodiversidad y Cambios Climáticos of Bolivia (18052012) in collaboration between Museo de Historia Natural Noel Kempff Mercado (Bolivia) and Estación Biológica de Doñana, Consejo Superior de Investigaciones Científicas (CSIC, Spain), and in accordance with the approved guidelines of the Consejo Superior de Investigaciones Científicas (CSIC, Spain). Sampling protocols used in this study were approved by the Ethic Committee of the Consejo Superior de Investigaciones Científicas, CSIC (CEBA-EBD_11_27). The samples obtained in Bolivia were exported to Spain for molecular analyses under CITES permit no. 01998.

**Data availability**

All data generated or analysed during this study are included in this published article (and its Supplementary Information files).

Received: 30 June 2020; Accepted: 7 December 2020

Published online: 12 January 2021

**References**

1. Orsini, L., Vanoverbeke, J., Swillen, I., Mergeay, J. & De Meester, L. Drivers of population genetic differentiation in the wild: isolation by dispersal limitation, isolation by adaptation and isolation by colonization. *Mol. Ecol.* **22**, 5983–5999. https://doi.org/10.1111/mec.12561 (2013).

2. Legrand, D. et al. Eco-evolutionary dynamics in fragmented landscapes. *Ecography* **40**, 9–25. https://doi.org/10.1111/ecog.02537 (2017).

3. Slatkin, M. Gene flow and the geographic structure of natural populations. *Science* **236**, 787–792. https://doi.org/10.1126/science.3576198 (1987).

4. Dolby, G. A., Dorsey, R. J. & Graham, M. R. A legacy of geo-climatic complexity and genetic divergence along the lower Colorado River: Insights from the geological record and 33 desert-adapted animals. *J. Biogeogr.* **46**, 2479–2505. https://doi.org/10.1111/jbi.13685 (2019).

5. Stevens, V. M. et al. A comparative analysis of dispersal syndromes in terrestrial and semi-terrestrial animals. *Ecol. Lett.* **17**, 1039–1052. https://doi.org/10.1111/ele.12303 (2014).

6. Ross, K. G. Molecular ecology of social behaviour: analyses of breeding systems and genetic structure. *Mol. Ecol.* **10**, 265–284. https://doi.org/10.1046/j.1365-294X.2001.01191.x (2001).

7. Beck, N. R., Peakall, R. & Heinsohn, R. Social constraint and an absence of sex-biased dispersal drive fine-scale genetic structure in white-winged choughs. *Mol. Ecol.* **17**, 4346–4358. https://doi.org/10.1111/j.1365-294X.2008.03906.x (2008).

8. Morinha, F. et al. Extreme genetic structure in a social bird species despite high dispersal capacity. *Mol. Ecol.* **26**, 2812–2825. https://doi.org/10.1111/mec.14069 (2017).

9. Marzluff, J. M. & Angell, T. Cultural coevolution: how the human bond with crows and ravens extends theory and raises new questions. *J. Ecol. Anthropol.* **9**, 69–75 (2005).

10. Toft, C. A. & Wright, T. F. *Parrots of the wild: A natural history of the world's most captivating birds* (Univ. California Press, Oakland, California, USA, 2015).

11. Armansin, N. C. et al. Social barriers in ecological landscapes: The social resistance hypothesis. *Trends Ecol. Evol.* **35**, 137–148. https://doi.org/10.1016/j.tree.2019.10.001 (2020).

12. Abdelkrim, J., Hunt, G. R., Gray, R. D. & Gemmell, N. J. Population genetic structure and colonisation history of the tool-using New Caledonian Crow. *PLoS ONE* **7**, e36608. https://doi.org/10.1371/journal.pone.0036608 (2012).

13. Rutz, C., Ryder, T. B. & Fleischer, R. C. Restricted gene flow and fine-scale population structuring in tool using New Caledonian crows. *Naturwissenschaften* **99**, 313–320. https://doi.org/10.1007/s00114-012-0904-6 (2012).

14. Wright, T. F., Rodriguez, A. M. & Fleischer, R. C. Vocal dialects, sex-biased dispersal, and microsatellite population structure in the parrot *Amazona auropalliata*. *Mol. Ecol.* **14**, 1197–1205. https://doi.org/10.1111/j.1365-294X.2005.02466.x (2005).

15. Hobson, E. A., Avery, M. L. & Wright, T. F. The socioecology of Monk Parakeets: Insights into parrot social complexity. *Auk* **131**, 756–775. https://doi.org/10.1642/AUK-14-14.1 (2014).

16. Wright, T. F. & Dahlin, C. R. Vocal dialects in parrots: patterns and processes of cultural evolution. *Emu* **118**, 50–66. https://doi.org/10.1080/01584197.2017.1379356 (2018).

17. Smith-Vidaurre, G., Araya-Salas, M. & Wright, T. F. Individual signatures outweigh social group identity in contact calls of a communally nesting parrot. *Behav. Ecol.* **31**, 448–458. https://doi.org/10.1093/beheco/azr202 (2020).

18. Lowe, W. H., Kovach, R. P. & Allendorf, F. W. Population genetics and demography unite ecology and evolution. *Trends Ecol. Evol.* **32**, 141–152. https://doi.org/10.1016/j.tree.2016.12.002 (2017).

19. Liedvogel, M., Åkesson, S. & Bensch, S. The genetics of migration on the move. *Trends Ecol. Evol.* **26**, 561–569. https://doi.org/10.1016/j.tree.2011.07.009 (2011).

20. Méndez, M., Vögeli, M., Tella, J. L. & Godoy, J. A. Joint effects of population size and isolation on genetic erosion in fragmented populations: finding fragmentation thresholds for management. *Evol. Appl.* **7**, 506–518. https://doi.org/10.1111/eva.12154 (2014).

21. Klauke, N., Schaefer, H. M., Bauer, M. & Segelbacher, G. Limited dispersal and significant fine-scale genetic structure in a tropical montane parrot species. *PLoS ONE* **11**, e0169165. https://doi.org/10.1371/journal.pone.0169165 (2016).

22. Monge, O., Schmidt, K., Vaughan, C. & Gutiérrez-Espeleta, G. Genetic patterns and conservation of the Scarlet Macaw (*Ara macao*) in Costa Rica. *Conserv. Genet.* **17**, 745–750. https://doi.org/10.1007/s10592-015-0804-3 (2016).

23. Kopps, A. M. et al. Cultural transmission of tool use combined with habitat specializations leads to fine-scale genetic structure in bottlenose dolphins. *Proc. R. Soc. Lond., B, Biol. Sci.* **281**, 20133245. https://doi.org/10.1098/rspb.2013.3245 (2014).

24. Foote, A. D. et al. Genome-culture coevolution promotes rapid divergence of killer whale ecotypes. *Nat. Commun.* **7**, 1–12. https://doi.org/10.1038/ncomms11693 (2016).
25. Pilot, M., Dahlheim, M. E. & Hoelzel, A. R. Social cohesion among kin, gene flow without dispersal and the evolution of population genetic structure in the killer whale (*Orcinus orca*). *J. Evol. Biol.* **23**, 20–31. https://doi.org/10.1111/j.1420-9101.2009.01887.x (2010).

26. Estrada, A. Reintroduction of the scarlet macaw (*Ara macao cyanoptera*) in the tropical rainforests of Palenque, Mexico: Project design and first year progress. *Trop. Conserv. Sci.* **7**, 342–364. https://doi.org/10.1177/194008291400700301 (2014).

27. Lopes, A. R. et al. The influence of anti-predator training, personality and sex in the behavior, dispersion and survival rates of translocated captive-raised parrots. *Glob Ecol. Conserv.* **11**, 146–157. https://doi.org/10.1016/j.gecco.2017.05.001 (2017).

28. Pitter, E. & Christiansen, M. B. Ecology, status and conservation of the Red-fronted Macaw *Ara rubrogenys*. *Bird Conserv Int.* **5**, 61–78. https://doi.org/10.1017/S0959270900002951 (1995).

29. Meyer, C. Spatial ecology and conservation of the endemic and endangered Red-fronted Macaw (*Ara rubrogenys*) in the Bolivian Andes. Diploma Thesis. Centre for Nature Conservation, Faculty of Biology, Georg-August University Göttingen (2010).

30. Tella, J. L., Rojas, A., Carrete, M. & Hiraldo, F. Simple assessments of age and spatial population structure can aid conservation of poorly known species. *Biol. Conserv.* **167**, 425–434. https://doi.org/10.1016/j.biocon.2013.08.035 (2013).

31. Leite, K. C. E., Seixas, G. H. F., Berkunsky, I., Collevatti, R. G. & Caparroz, R. Population genetic structure of the blue-fronted Amazon (*Amazona aestiva*, Psittacidae: Aves) based on nuclear microsatellite loci: Implications for conservation. *Genet. Mol. Res.* **7**, 819–829. https://doi.org/10.4238/vol7-3gmr474 (2008).

32. Masello, J. F. et al. The high Andes, gene flow and a stable hybrid zone shape the genetic structure of a wide-ranging South American parrot. *Front. Zool.* **8**, 16. https://doi.org/10.1186/1742-9994-8-16 (2011).

33. Olah, G., Heinsohn, R. G., Brightsmith, D. J. & Peakall, R. The application of non-invasive genetic tagging reveals new insights into the clay lick use by macaws in the Peruvian Amazon. *Conserv. Genet.* **18**, 1037–1046. https://doi.org/10.1007/s10592-017-0954-6 (2017).

34. Ellegren, H. et al. Microsatellite evolution: A reciprocal study of repeat lengths at homologous loci in cattle and sheep. *Mol. Biol. Evol.* **14**, 854–860. https://doi.org/10.1093/oxfordjournals.molbev.a025826 (1997).

35. Mills, L. S., Citta, J. J., Lair, K. P., Schwartz, M. K. & Tallmon, D. A. Estimating animal abundance using noninvasive DNA sampling: Promise and pitfalls. *Ecol. Appl.* **10**, 283–294. https://doi.org/10.1890/1051-0761(2000)010[0283:EAAUND]2.0.CO;2 (2000).

36. Alcaide, M., Serrano, D., Tella, J. L. & Negro, J. J. Strong philopatry derived from capture-recapture methods does not lead to fine-scale genetic differentiation in lesser kestrels. *J. Anim. Ecol.* **78**, 468–475. https://doi.org/10.1111/j.1365-2656.2008.01493.x (2009).

37. Barrowclough, G. F. Gene flow, effective population sizes, and genetic variance components in birds. *Evolution* **34**, 789–798. https://doi.org/10.2307/2408033 (1980).

38. Frankham, R., Ballou, J. D. & Briscoe, D. A. *Introduction to conservation genetics* (Cambridge University Press, Cambridge, 2010).

39. Jones, O. R. & Wang, J. A comparison of four methods for detecting weak genetic structure from marker data. *Ecol. Evol.* **2**, 1048–1055. https://doi.org/10.1002/ece3.237 (2012).

40. van Rees, C. B., Reed, J. M., Wilson, R. E., Underwood, J. G. & Sonsthagen, S. A. Small-scale genetic structure in an endangered wetland specialist: possible effects of landscape change and population recovery. *Conserv. Genet.* **19**, 129–142. https://doi.org/10.1007/s10592-017-1020-0 (2018).

41. Hubisz, M. J., Falush, D., Stephens, M. & Pritchard, J. K. Inferring weak population structure with the assistance of sample group information. *Mol. Ecol. Resour.* **9**, 1322–1332. https://doi.org/10.1111/j.1755-0998.2009.02591.x (2009).

42. Graciá, E. et al. Genetic signatures of demographic changes in an avian top predator during the last century: Bottlenecks and expansions of the Eurasian Eagle Owl in the Iberian Peninsula. *PLoS ONE* **10**, e0133954. https://doi.org/10.1371/journal.pone.0133954 (2015).

43. Williamson-Natesan, E. G. Comparison of methods for detecting bottlenecks from microsatellite loci. *Conserv. Genet.* **6**, 551–562. https://doi.org/10.1007/s10592-005-9009-5 (2005).

44. Peery, M. Z. et al. Reliability of genetic bottleneck tests for detecting recent population declines. *Mol. Ecol.* **21**, 3403–3418. https://doi.org/10.1111/j.1365-294X.2012.05635.x (2012).

45. Garza, J. C. & Williamson, E. G. Detection of reduction in population size using data from microsatellite loci. *Mol. Ecol.* **10**, 305–318. https://doi.org/10.1046/j.1365-294X.2001.01190.x (2001).

46. BirdLife International. *Ara rubrogenys*. The IUCN Red List of Threatened Species 2018: e.T22685572A131382876. Downloaded on 30 May 2020 (2018). https://doi.org/10.2305/IUCN.UK.2018-2.RLTS.T22685572A131382876.en (2018).

47. El, D. O. *reto del espacio andino* (Instituto de Estudios Peruanos, Lima, Perú, 1981).

48. Williams, J. J., Gosling, W. D., Coe, A. L., Brooks, S. J. & Gulliver, P. Four thousand years of environmental change and human activity in the Cochabamba Basin Bolivia. *Quat. Res.* **76**, 58–68. https://doi.org/10.1016/j.qyres.2011.03.004 (2011).

49. Flantua, S. G. et al. Climate variability and human impact in South America during the last 2000 years: synthesis and perspectives from pollen records. *Clim. Past* **12**, 483–523. https://doi.org/10.5194/cp-12-483-2016 (2016).

50. Schlaifer, M., Las especies nativas y la deforestación en los Andes. Una visión histórica, social y cultural en Cochabamba, Bolivia. *Bulletin de l'Institut français d'études andines* **22**, 585–610 (1993).

51. Sánchez Canedo, W. Inkas, “flecheros” y mitmaqkuna: Cambio social y paisajes culturales en los Valles y en los Yungas de Inkachaca/Paracti y Tablas Monte (Cochabamba-Bolivia, siglos XV-XVI) (Doctoral dissertation, Institutionen för arkeologi och antik historia) Universitetstrykertet, Uppsala, Sweden (2008).

52. Cobo, B. Historia del Nuevo Mundo (Obras del P. Bernabé Cobo) II Tomos. Estudio preliminar y edición del P. Francisco Mateos. Biblioteca de Autores Españoles, Madrid. Disponible en: http://www.bibliotecavirtualdeandalucia.es/catalogo/consulta/registro.cmd?id=1014725 (1964) [1652].

53. Guaman Poma de Ayala, F. El primer Nueva corónica y buen gobierno [1615] (eds J. V. Murra and R. Adorno, Quechua trans. J. L. Urioste), 3 vols. Mexico City: Siglo Veintiuno 1980 [1615].

54. Tella, J. L. The unknown extent of ancient bird introductions. *Ardeola* **58**, 399–404. https://doi.org/10.13157/arla.58.2.2011.399 (2011).

55. Wilkinson, D., The influence of Amazonia on state formation in the ancient Andes. *Antiquity* **92**, 1362–1376. https://doi.org/10.15184/aqy.2018.194 (2018).

56. Gomez Casaverde, Y. *Textiles Chimú con aplicaciones de plumas del Sitio Huaca de la Luna (Circa 800 dc-1470 dc)*: caracterización tecnológica y aproximación a las rutas de intercambio amazónico-andinas (Modelización y Técnicas Analíticas. Universidad Nacional de Trujillo. Trujillo, Perú. Maestría en Arqueología Sudamericana mención Arqueometría, 2020).

57. Boakes, E. H., Wang, J. & Amos, W. An investigation of inbreeding depression and purging in captive pedigreed populations. *Heredity* **98**, 172–182. https://doi.org/10.1038/sj.hdy.6800923 (2007).

58. Witzenberger, K. A. & Hochkirch, A. Ex situ conservation genetics: a review of molecular studies on the genetic consequences of captive breeding programmes for endangered animal species. *Biodivers. Conserv.* **20**, 1843–1861. https://doi.org/10.1007/s10531-011-0074-4 (2011).

59. Thévenon, S., Bonnet, A., Claro, F. & Maillard, J. C. Genetic diversity analysis of captive populations: The Vietnamese sika deer (*Cervus nippon pseudaxis*) in zoological parks. *Zool. Biol.* **22**, 465–475. https://doi.org/10.1002/zoo.10091 (2003).
60. Kekkonen, J., Wikström, M. & Brommer, J. E. Heterozygosity in an isolated population of a large mammal founded by four individuals is predicted by an individual-based genetic model. *PLoS ONE* 7, e43482. https://doi.org/10.1371/journal.pone.0043482 (2012).

61. Jackson, N. D. & Fahrig, L. Habitat amount, not habitat configuration, best predicts population genetic structure in fragmented landscapes. *Landsc. Ecol.* **31**, 951–968. https://doi.org/10.1007/s10980-015-0313-2 (2016).

62. Gibbs, J. P. Demography versus habitat fragmentation as determinants of genetic variation in wild populations. *Biol. Conserv.* **100**, 15–20. https://doi.org/10.1016/S0006-3207(00)00203-2 (2016).

63. Blanco, G., Hiraldo, F. & Tella, J. L. Ecological functions of parrots: an integrative perspective from plant life cycle to ecosystem functioning. *Emu* **118**, 36–49. https://doi.org/10.1080/01584197.2017.1387031 (2018).

64. Storfer, A. et al. Putting the “landscape” in landscape genetics. *Heredity* **98**, 128–142. https://doi.org/10.1038/sj.hdy.6800917 (2007).

65. Sexton, J. P., Hangartner, S. B. & Hoffmann, A. A. Genetic isolation by environment or distance: which pattern of gene flow is most common? *Evolution* **68**, 1–15. https://doi.org/10.1111/evo.12258 (2014).

66. Rojas, A., Yucra, E., Vera, I., Requejo, A. & Tella, J. A new population of the globally endangered red-fronted Macaw *Ara rubrogens* is unusually breeding in palms. *Bird Conserv. Int.* **24**, 389–392. https://doi.org/10.1017/S095927091200038X (2014).

67. Blanco, G., Hiraldo, F., Rojas, A., Dénes, F. V. & Tella, J. L. Parrots as key multilinkers in ecosystem structure and functioning. *Ecol. Evol.* **5**, 4141–4160. https://doi.org/10.1002/ece3.1663 (2015).

68. Andrews, K. Population genetics in the conservation of cetaceans and primates in *Primates and Cetaceans: Field Research and Conservation of Complex Mammalian Societies* (eds. Yamagiwa, J. & Karczmarski, L.) 289–30 (Springer, Japan, 2014).

69. Manel, S. & Holderegger, R. T. years of landscape genetics. *Trends Ecol. Evol.* **28**, 614–621. https://doi.org/10.1016/j.tree.2013.05.012 (2013).

70. Lowe, W. H. & Allendorf, F. W. What can genetics tell us about population connectivity? *Mol. Ecol* **19**, 3038–3051. https://doi.org/10.1111/j.1365-294X.2010.04688.x (2010).

71. Hatchwell, B. J. Cryptic kin selection: kin structure in vertebrate populations and opportunities for kin-directed cooperation. *Ethology* **116**, 203–216. https://doi.org/10.1111/j.1439-0310.2009.01732.x (2010).

72. Bicknell, A. W. J. et al. Population genetic structure and long-distance dispersal among seabird populations: Implications for colony persistence. *Mol. Ecol.* **21**, 2863–2876. https://doi.org/10.1111/j.1365-294X.2012.05558.x (2012).

73. Welch, A. J. et al. Population divergence and gene flow in an endangered and highly mobile seabird. *Heredity* **109**, 19–28. https://doi.org/10.1038/hdy.2012.7 (2012).

74. Bonilla, L. M. Monitoreo de la nidificación de la Paraba Frente Roja (*Ara rubrogenys*) en dos sitios de reproducción en los valles de los Departamentos de Santa Cruz y Cochabamba) en dos sitios de reproducción en los valles de los Departamentos de Santa Cruz y Cochabamba (Universidad Autónoma Gabriel René Moreno, Santa Cruz de La Sierra, Bolivia, 2007).

75. Caparroz, R., Miyaki, C. Y. & Baker, A. J. Contrasting phylogeographic patterns in mitochondrial DNA and microsatellites: evidence of female philopatry and male-biased gene flow among regional populations of the blue-and-yellow macaw (Psittaciformes: *Ara ararauna*) in Brazil. *Auk* **126**, 359–370. https://doi.org/10.1525/auk.2009.07183 (2009).

76. Alcaide, M. et al. Population fragmentation leads to isolation by distance but not genetic impoverishment in the philopatric Lesser Kestrel: a comparison with the widespread and sympatric Eurasian Kestrel. *Heredity* **102**, 190–198. https://doi.org/10.1038/hdy.2008.107 (2009).

77. Olah, G. et al. Exploring dispersal barriers using landscape genetic resistance modelling in scarlet macaws of the Peruvian Amazon. *Landsc. Ecol.* **32**, 445–456. https://doi.org/10.1007/s10980-016-0457-8 (2017).

78. Pitter, E. & Christiansen, M. B. Behavior of individuals and social interactions of the Red-fronted Macaw *Ara rubrogenys* in the wild during the mid-day rest. *Ornitol. Neotrop.* **8**, 133–143 (1997).

79. Keighley, M. V., Heinsohn, R., Langmore, N. E., Murphy, S. A. & Peñalba, J. V. Genomic population structure aligns with vocal dialects in Palm Cockatoos (*Probosciger aterrimus*); evidence for refugial late-Quaternary distribution? *EMU* **119**, 24–37. https://doi.org/10.1080/01584197.2018.1483731 (2019).

80. Pacifico, E. C. et al. Breeding to non-breeding population ratio and breeding performance of the globally endangered Lear's Macaw (*Anodorhynchus leari*): conservation and monitoring implications. *Bird Conserv. Int.* **24**, 466–476. https://doi.org/10.1017/S095927091300049X (2014).

81. Stutchbury, B. J. & Zack, S. Delayed breeding in avian social systems: the role of territory quality and "floater" tactics. *Behaviour* **123**, 194–219. https://doi.org/10.1163/156853992X00020 (1992).

82. Kokko, H. & Sutherland, W. J. Optimal floating and queuing strategies: consequences for density dependence and habitat loss. *Am. Nat.* **152**, 354–366. https://doi.org/10.1086/286174 (1998).

83. Blanco, G., Laiolo, P. & Fargallo, J. A. Linking environmental stress, feeding-shifts and the 'island syndrome': a nutritional challenge hypothesis. *Popul. Ecol.* **56**, 203–216. https://doi.org/10.1007/s10144-013-0404-3 (2014).

84. Koenig, W. D. & Dickinson, J. L. Cooperative breeding in vertebrates: studies of ecology, evolution, and behavior. Cambridge University Press (2016).

85. Gao, H., Bryc, K. & Bustamante, C. D. On identifying the optimal number of population clusters via the deviance information criterion. *PLoS ONE* **6**, e21014. https://doi.org/10.1371/journal.pone.0021014 (2011).

86. Rodríguez-Ramilo, S. T. & Wang, J. The effect of close relatives on unsupervised Bayesian clustering algorithms in population genetic structure analysis. *Mol. Ecol. Resour.* **12**, 873–884. https://doi.org/10.1111/j.1755-0998.2012.03156.x (2012).

87. Harrisson, K. A. et al. Fine-scale effects of habitat loss and fragmentation despite large-scale gene flow for some regionally declining woodland bird species. *Landsc. Ecol.* **27**, 813–827. https://doi.org/10.1007/s10980-012-9743-2 (2012).

88. Rull, V. Microrefugia. *J. Biogeogr.* **36**, 481–484. https://doi.org/10.1111/j.1365-2699.2008.02023.x (2009).

89. Nadachowska-Brzyska, K., Li, C., Smeds, L., Zhang, G. & Ellegren, H. Temporal dynamics of avian populations during Pleistocene revealed by whole-genome sequences. *Curr. Biol.* **25**, 1375–1380. https://doi.org/10.1016/j.cub.2015.03.047 (2015).

90. James, J. E., Lan fear, R. & Eyre-Walker, A. Molecular evolutionary consequences of island colonization. *Genome Biol. Evol.* **8**, 1876–1888. https://doi.org/10.1093/gbe/evw120 (2016).

91. Gregory-Wodzicki, K. M. Uplift history of the central and Northern Andes: A review. *Geol. Soc. Am. Bull.* **112**, 1091–1105. https://doi.org/10.1130/0016-7606(2000)112%3c1091:UHOTCA%3e2.0.CO;2 (2000).

92. Navarro, G. & Maldonado M. Geografía ecológica de Bolivia: vegetación y ambientes acuáticos. Edit.: Centro de Ecología Simón I. Patiño-Departamento de Difusión. Cochabamba, Bolivia (2002).

93. López, R. P. Phytogeographical relations of the Andean dry valleys of Bolivia. *J. Biogeogr.* **30**, 1659–1668. https://doi.org/10.1016/j.bgev.2003.00919.x (2003).

94. Montesinos-Navarro, A., Hiraldo, F., Tella, J. L. & Blanco, G. Network structure embracing mutualism–antagonism continuums increases community robustness. *Nat. Ecol. Evol.* **1**, 1661–1669. https://doi.org/10.1038/s41559-017-0320-6 (2017).

95. Da Silva, A. G., Eberhard, J. R., Wright, T. F., Avery, M. L. & Russell, M. A. Genetic evidence for high propagule pressure and long-distance dispersal in monk parakeet (*Myiopsitta monachus*) invasive populations. *Mol. Ecol.* **19**, 3336–3350. https://doi.org/10.1111/j.1365-294X.2010.04749.x (2010).

96. Russell, M., Calcagnotto, D., DeSalle, R. & Amato, G. Characterization of microsatellite loci in the endangered St. Vicent parrot, *Amazona gouldingii*. *Mol. Ecol. Notes* **1**, 13–13. https://doi.org/10.1046/j.1471-8278.2001.00061.x (2001).
97. Bergner, L. M., Jamieson, I. G. & Robertson, B. C. Combining genetic data to identify relatedness among founders in a genetically depauperate parrot, the Kakapo (*Strigops habroptilus*). *Conserv. Genet.* **15**, 1013–1020. https://doi.org/10.1007/s10592-014-0595-y (2014).

98. Stojanovic, D., Olah, G., Webb, M., Peakall, R. & Heinsohn, R. Genetic evidence confirms severe extinction risk for critically endangered swift parrots: implications for conservation management. *Anim. Conserv.* **21**, 313–323. https://doi.org/10.1111/acv.12394 (2018).

99. Väli, Ü., Einarsson, A., Waits, L. & Ellegren, H. To what extent do microsatellite markers reflect genome-wide genetic diversity in natural populations?. *Mol. Ecol.* **17**, 3808–3817. https://doi.org/10.1111/j.1365-294X.2008.03876.x (2008).

100. Young, A. M., Hobson, E. A., Lackey, L. B. & Wright, T. E. Survival on the ark: Life-history trends in captive parrots. *Anim. Conserv.* **15**, 28–43. https://doi.org/10.1111/j.1469-1795.2011.00477.x (2012).

101. Fraser, D. J. & Bernatchez, L. Adaptive evolutionary conservation: Towards a unified concept for defining conservation units. *Mol. Ecol.* **10**, 2741–2752. https://doi.org/10.1046/j.0962-1083.2001.01411.x (2001).

102. Palsbøll, P. J., Bérubé, M. & Allendorf, F. W. Identification of management units using population genetic data. *Trends Ecol. Evol.* **22**, 11–16. https://doi.org/10.1016/j.tree.2006.09.003 (2007).

103. Schiegg, K. Environmental autocorrelation: curse or blessing?. *Trends Ecol. Evol.* **18**, 212–214. https://doi.org/10.1016/S0169-5347(03)00074-0 (2004).

104. Shafer, A. B. A. et al. Genomics and the challenging translation into conservation practice. *Trends Ecol. Evol.* **30**, 78–87. https://doi.org/10.1016/j.tree.2014.11.009 (2015).

105. Valière, N. GIMLET: a computer program for analysing genetic individual identification data. *Mol. Ecol. Notes* **2**, 377–379. https://doi.org/10.1046/j.1471-8286.2002.00228.x-i2 (2002).

106. Jones, O. R. & Wang, J. COLONY: a program for parentage and sibship inference from multilocus genotype data. *Mol. Ecol. Resour.* **10**, 551–555. https://doi.org/10.1111/j.1755-0998.2009.02787.x (2010).

107. Keller, L. F. & Waller, D. M. Inbreeding effects in wild populations. *Trends Ecol. Evol.* **17**, 230–241. https://doi.org/10.1016/S0169-5347(02)02489-8 (2002).

108. Weir, B. S. & Cockerham, C. C. Estimating F-statistics for the analysis of population structure. *Evolution* **38**, 1358–1370. https://doi.org/10.2307/2408641 (1984).

109. Peakall, R. & Smouse, P. E. GenAlEx 6.5: genetic analysis in Excel. Population genetic software for teaching and research–an update. *Bioinformatics* **28**, 2537–2539. https://doi.org/10.1111/j.1471-8286.2005.01155.x (2012).

110. Pritchard, J. K., Stephens, M. & Donnelly, P. Inference of population structure using multilocus genotype data. *Genetics* **155**, 945–959 (2000).

111. Falush, D., Stephens, M. & Pritchard, J. K. Inference of population structure using multilocus genotype data: linked loci and correlated allele frequencies. *Genetics* **164**, 1567–1587 (2003).

112. Kopelman, N. M., Mayzel, J., Jakobsson, M., Rosenberg, N. A. & Mayrose, I. Clumpak: a program for identifying clustering modes and packaging population structure inferences across K. *Mol. Ecol. Resour.* **15**, 1179–1191. https://doi.org/10.1111/1755-0998.12387 (2015).

113. Earl, D. A. & von Holdt, B. M. STRUCTURE HARVESTER: a website and program for visualizing STRUCTURE output and implementing the Evanno method. *Conserv. Genet. Resour.* **4**, 359–361. https://doi.org/10.1007/s12686-011-9548-7 (2012).

114. Tishkoff, S. A., Reed, F. A., Friedlaender, F. R., Ehret, C., Ranciaro, A., Froment, et al. The genetic structure and history of Africans and African Americans. *Science* **324**, 1035–1044. https://doi.org/10.1126/science.1172257 (2009).

115. Evanno, G., Regnaut, S. & Goudet, J. Detecting the number of clusters of individuals using the software STRUCTURE: a simulation study. *Mol. Ecol.* **14**, 2611–2620. https://doi.org/10.1111/j.1365-294X.2005.02553.x (2005).

116. Rousset, F. *genepop*007: a complete re-implementation of the *genepop* software for Windows and Linux. *Mol. Ecol. Resour.* **8**, 103–106. https://doi.org/10.1111/j.1471-8286.2007.01931.x (2008).

117. Botstein, D., White, R. L., Skolnick, M. & Davis, R. W. Construction of a genetic linkage map in man using restriction fragment length polymorphisms. *Am. J. Hum. Genet.* **32**, 314–331 (1980).

118. Kalinowski, S. T., Taper, M. L. & Marshall, T. C. Revising how the computer program CERVUS accommodates genotyping error increases success in paternity assignment. *Mol. Ecol.* **16**, 1099–1106. https://doi.org/10.1111/j.1365-294X.2007.03089.x (2007).

119. Ciofi, C., Beaumontf, M. A., Swingland, I. R. & Bruford, M. W. Genetic divergence and units for conservation in the Komodo dragon *Varanus komodoensis*. *Proc. R. Soc. Lond. B Biol. Sci.* **266**, 2269–2274. https://doi.org/10.1098/rspb.1999.0918 (1999).

120. Piry, S., Luikart, G. & Cornuet, J. M. BOTTLENECK: a computer program for detecting recent reductions in the effective population size using allele frequency data. *J. Hered.* **90**, 502–503. https://doi.org/10.1093/jhered/90.4.502 (1999).

121. Queller, D. C. & Goodnight, K. F. Estimating relatedness using genetic markers. *Evolution* **43**, 258–275. https://doi.org/10.1111/j.1558-5646.1989.tb04226.x (1989).

122. Wilson, G. A. & Rannala, B. Bayesian inference of recent migration rates using multilocus genotypes. *Genetics* **163**, 1177–1191 (2003).

123. Piry, S. et al. *GENECLASS2*: a software for genetic assignment and first-generation migrant detection. *J. Hered.* **95**, 536–539. https://doi.org/10.1093/jhered/esh074 (2004).

124. Waples, R. S. & Do, C. H. I. LDNE: a program for estimating effective population size from data on linkage disequilibrium. *Mol. Ecol. Resour.* **8**, 753–756. https://doi.org/10.1111/sec.12561 (2008).

125. Waples, R. S. & Do, C. H. I. Linkage disequilibrium estimates of contemporary Ne using highly variable genetic markers: a largely untapped resource for applied conservation and evolution. *Evol. Appl.* **3**, 244–262. https://doi.org/10.1111/j.1752-4571.2009.00104.x (2010).

126. Rousset, F. Genetic differentiation and estimation of gene flow from F-statistics under isolation by distance. *Genetics* **145**, 1219–1228 (1997).

127. Bohonak, A. J. IBD (isolation by distance): a program for analyses of isolation by distance. *J. Hered.* **93**, 153–154. https://doi.org/10.1093/jhered/93.2.153 (2002).

## Acknowledgements

This work was funded by Fundación Biodiversidad (521.CA2109) and further supported by Loro Parque Fundación (PP-146-2018-1). I. Afán (LAST-EBD) elaborated the maps, and laboratory, logistic and technical support was provided by Doñana ICTS-RBD. F. M. was supported by a Juan de la Cierva postdoctoral fellowship from Spain's Ministry of Science and Innovation (FJCI-2017-32055) for part of this work. We thank handling Editor R. Godinho and three anonymous reviewers for constructive comments on a previous version of this article.

## Author contributions

J.L.T., F.H., A.R., and G.B. conceived and designed the study. J.L.T., F.H., A.R., and G.B. conducted fieldwork. S.R., F.M., J.L.T., F.H. and G.B. organized data. S.R., F.M. and G.B. carried out laboratory and statistical analyses.
S.R., F.M., and G.B. wrote the first draft of the paper. All authors participated in improving the manuscript and gave final approval for publication.

**Competing interests**

The authors declare no competing interests.

**Additional information**

**Supplementary Information** The online version contains supplementary material available at https://doi.org/10.1038/s41598-020-79575-6.

**Correspondence** and requests for materials should be addressed to G.B.

**Reprints and permissions information** is available at www.nature.com/reprints.

**Publisher's note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_6.png" /></figure>

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2021