Inner Asian maternal genetic origin of the Avar period nomadic elite in the 7th century AD Carpathian Basin

After 568 AD the nomadic Avars settled in the Carpathian Basin and founded their empire, which was an important force in Central Europe until the beginning of the 9 century AD. The Avar elite was probably of Inner Asian origin; its identification with the Rourans (who ruled the region of today’s Mongolia and North China in the 4-6 centuries AD) is widely accepted in the historical research. Here, we study the whole mitochondrial genomes of twenty-three 7 century and two 8 century AD individuals from a well-characterised Avar elite group of burials excavated in Hungary. Most of them were buried with high value prestige artefacts and their skulls showed Mongoloid morphological traits. The majority (64%) of the studied samples’ mitochondrial DNA variability belongs to Asian haplogroups (C, D, F, M, R, Y and Z). This Avar elite group shows affinities to several ancient and modern Inner Asian populations. The genetic results verify the historical thesis on the Inner Asian origin of the Avar elite, as not only a military retinue consisting of armed men, but an endogamous group of families migrated. This correlates well with records on historical nomadic societies where maternal lineages were as important as paternal descent.


Introduction
The Carpathian Basin in East-Central Europe is generally regarded as the westernmost point of the Eurasian steppe; as such, its history was often influenced by the movements of nomadic people of eastern origin. At the end of the 6 th century AD, the nomadic Avars settled in the Carpathian Basin and founded their empire which remained a powerful player in the geopolitical arena of Central and Eastern Europe for a quarter of a millennium [1][2][3] . The Avar population cannot be regarded as homogeneous, as the Avar occupation of the Carpathian Basin can be best understood if set against the backdrop of how nomadic peoples built their empires 4-7 . The Avars conquered and then united different nomadic people from Eastern Europe and Asia, the Late Antique and Germanic population of the former Roman province Pannonia, Slavs, and other inhabitants of the border provinces of the Byzantine Empire under their rule 8,9 . Historical and archaeological context The identification of the Avars with the Inner Asian Rourans mentioned by several Chinese chronicles appeared as early as the 18 th century and it is still the most accepted theories in the historiography of the Avars up until the middle of the 20 th century when the rival thesis of their Central Asian Hunnic (Hephtalite) descent of the Avars was born. This debate remained unsolved, however a rising number of evidences points towards the Rourans. The solution of this question is hindered by the paucity and obscurity of sources: according to a written account describing a Byzantine embassy to the Western Turkic Qaganate, the Turkic ruler, Silzibulos, claimed that the Avars were his subjects who escaped from his will and that they unrightfully usurped the title Qagan and the name 'Avar' as these fugitives were Warkhonitai, i.e. not real Avars in the Turkic Qagan's view 2,10-12 . All of this suggests that at least the Avars' elite was of Inner Asian origin, bringing titles and institutions of a nomadic state to the Carpathian Basin. The Avar ruler's title Qagan appeared in Inner Asia among the Xianbei people during the 3 rd century. The Rourans, who founded an empire in today's Mongolia that lasted until the mid-6 th century, inherited the title and used it to label their supreme leader 6 . As such, the Avar elite's identification with refugees of the Rouran ruling stratum is based on the analysis of written accounts like Theophylact Simocatta's Pseudo-Avar story or by the sudden appearance of titles and personal names of Inner Asian origin (Qagan, Bayan, Yugurrus, Tarkhan, etc.) 2,11,12 . The connection to Inner Asia is attested by the clear cultural contacts of their archaeological material as well. The language of the Avars and Rourans is unknown. The only evidence that we have is from Inner Asia, which suggests Proto-Mongolian, Proto-Turkic and/or a still not defined Inner Asian language 12,13 .
Certain artefacts of the early Avar period material culture, such as elements of the horse harness and weaponry, were parts of the Eurasian nomadic cultures for centuries 3,14,15 . Certain prestigious artefact types have direct analogies from Mongolia and Northern China, while Avars may have contributed in the spread of Asian technological innovations in Europe. The Avar material culture shows, how a nomadic population and its ruling elite remained part of the connection network that is the Eurasian steppe, even generations after settling in the Carpathian Basin (Fig. 1).

Background of the bioarchaeological research
The Carpathian Basin witnessed population influxes from the Eurasian Steppes several times, but they are genetically poorly documented yet. The earliest such migration was that of the Yamnaya people in the 3 rd millennium BC 16 . The second population was the Iron Age Scythians, who settled the Eastern European area and the Carpathian Basin in the 1 st millennium BC. Scythians were described by a recent genomic study as genetically highly structured. The Scythian samples from Hungary had relatively increased European farmer ancestry and showed no signs of gene flow from Inner Asian groups 17 . In the 5 th century AD, the Carpathian Basin was conquered by the Huns, who are associated with the Inner Asian Xiongnu confederation in the historical and archaeological research. Their genetic origin is intensively studied as well 17 , but bioarchaeological data on the scarce human remains connected to the Huns from Hungary have not been published yet. Besides influxes from the east, the Carpathian Basin witnessed the movement of people from the north as well. The Lombards for e.g., who directly preceded the Avars in Transdanubia (today's Western Hungary), migrated across the Carpathian Basin to Italy in the mid-6 th century. The population of two analysed Lombard cemeteries in Hungary and Italy showed the Central and North European genomic ancestry of this Germanic tribe 18,19 .
Few ancient DNA studies have focused yet on the Avars, and these studies analysed only the control region of the maternally inherited mitochondrial DNA (mtDNA). One research focused on a 7 th -9 th century Avar group from the micro-region of south-eastern Great Hungarian Plain (Alföld) of the Carpathian Basin 20 . This group buried the deceased in catacomb graves and had mostly Europid, local morphological skull characters. Their maternal gene pool showed predominantly southern and Eastern European composition, with Asian elements presenting only 15.3% of the variation. These Asian haplotypes shared lineages with almost all comparative modern Central and East Asian populations.
Another recent study of a mixed Avar-Slavic population from the 8 th -9 th centuries from present-day Slovakia showed a mixed Eurasian character too, with a lower frequency (6.52%) of Asian (East Eurasian) elements 21 . Šebest et al. explained the rather European mtDNA composition with high assimilation rate in the investigated population, where the majority of marriages took place between Avar men and Slavic women 21 .
The Avar population was uniform in neither cultural nor anthropological characters. More than 100,000 graves from the Avar period were excavated in the territory of present-day Hungary. The osteological record shows heterogeneous anthropological composition with mainly Europid morphological characters, while Asian cranial indices were dominated only in certain regions and periods 22,23 (see Supplementary Information).
Using whole mitogenome sequencing, our current research focused on the maternal genetic composition and origin of an Avar period group of probably high-ranking individuals dated to the 7 th century AD. We also investigated the homogeneity and relationship of the leading stratum of the Avar population, as well as their genetic connection to other ancient and modern Eurasian population. We aimed to obtain information on the organisation of this nomadic group, as well as to track the Avars' genetic admixture with other contemporaneous populations and observe the extent of their genetic legacy in the later Medieval periods.
The studied individuals were excavated at ten different sites (found in small burial groups or single burials). Seven out of ten sites are located in the Danube-Tisza Interfluve (central part of present-day Hungary and the Carpathian Basin) dated to the middle of the 7 th century (Fig.  2). This group of lavishly furnished burials-most notable probably the so-called 'Qagan burial' from Kunbábony-is characterised by high value prestige artefacts such as swords, gold belt sets with pseudo-buckles and certain elements of precious metal tableware 24 (Fig.  S1, Supplementary Information). The concentration of burials with these artefacts can, in all likelihood, be linked to leaders of the early Avar polity and the Qagan's military retinue. They can also be seen as a reflection not only of a powerful military centralisation, but also of an Avar power centre in the Danube-Tisza Interfluve 25,26 . The primary focus of the sample selection was to target all available members of this elite group. During the sample collection it became evident that these individuals are also tied together by their physical anthropological characteristics, as the skulls showed mainly Mongoloid morphological traits to a different extent (Supplementary Information). To have a better understanding of this group, we later collected samples from 17 individuals with Mongoloid characteristics, but without any outstanding grave goods unique only to the highest social ranks (Fig. 2, Fig. S2) from the Danube-Tisza Interfluve and the Transtisza region.

Results
We investigated 25 Avar period individuals from an archaeologically, geographically and anthropologically well-defined group (Table S1). We managed to sequence the mitochondrial genome using a hybridisation capture method in 2-68x coverage (42x average coverage for the 25 samples, see Table S1). Osteological sex determination was checked by evaluating shallow shotgun sequencing data. The studied Avar group composed of 17 males and 8 females.
The mitochondrial genome sequences can be assigned to a wide range of the Eurasian haplogroups with dominance of the Asian lineages, which represent 64% of the variability: four samples belong to Asian macrohaplogroup C (two C4a1a4, one C4a1a4a and one C4b6); five samples to macrohaplogroup D (one by one D4i2, D4j, D4j12, D4j5a, D5b1), and three individuals to F (two F1b1b and one F1b1f). Each haplogroup M7c1b2b, R2, Y1a1 and Z1a1 is represented by one individual. One further haplogroup, M7 (probably M7c1b2b), was detected (sample AC20); however, the poor quality of its sequence data (2.19x average coverage) did not allow further analysis of this sample.
European lineages (occurring mainly among females) are represented by the following haplogroups: H (one H5a2 and one H8a1), one J1b1a1, three T1a (two T1a1 and one T1a1b), one U5a1 and one U5b1b (Table S1).
We detected two identical F1b1f haplotypes (AC11 female and AC12 male) and two identical C4a1a4 haplotypes (AC13 and AC15 males) from the same cemetery of Kunszállás; these matches indicate the maternal kinship of these individuals. There is no chronological difference between the female and the male from Grave 30 and 32 (AC11 and AC12), but the two males buried in Grave 28 and 52 (AC13 and AC15) are not contemporaries; they lived at least 2-3 generations apart.

Haplogroup based analyses
We performed Principal Component Analysis (PCA) with the Avar dataset using haplogroup frequencies of another 43 ancient and 64 modern populations (Tables S2 and S3, Figs. S3-4). The Avars show affinities to some Asian populations: they are close to 5 th -3 rd centuries BC Scythians from the Altai region and 15 th -19 th centuries Yakuts from East-Siberian Central Yakutia 27 along PC1 and PC2, while along PC3, the Avars are near to South Siberian Bronze Age populations of Andronovo and Krotovo cultures 28 on the Asian part of the plot, which is possibly caused by high loadings of the haplogroup vectors T1 and R ( Fig. S3a- Table S2). The strict separation of Asian and European populations is also displayed on the Ward-type clustering tree, which is based on the same dataset as the PCA. Here the Avar elite is located on an Asian branch of the tree and clustered together with Central Asian populations dated to the Late Iron Age, Hunnic and Medieval periods 17 , and furthermore, with Xiongnu period population from present-day Mongolia 29,30 and Scythians from the Altai region [31][32][33][34] (Fig. 3).
On the PCA plot with modern populations, the Avars are clustered together with Central Asian modern populations from Kazakhstan, Kyrgyzstan and the Altai region as well as with modern Uyghurs living in Northwest-China, East-Siberian Yakuts and Nganasans (Table S3). This phenomenon is pictured on the Ward-type clustering tree too, where the Asian, European and Central-South Asian and Near-Eastern populations are separated on the major branches, and the Avars are situated on the Asian branch, together with modern Altaian, Mongolian and Buryat populations, as well as with Kyrgyz, Uyghurs and Kazakhs (Fig. S5).

Sequence based analyses
The pairwise genetic distances were calculated between ancient and modern Eurasian populations based on 932 ancient and 3,945 modern publicly available whole mitochondrial genome sequences (Tables S4 and S5). The Avar group shows significant genetic distances (p <0.05) from most ancient populations. Only two groups from Central Asia have nonsignificant differences from the Avar elite: one group containing Late Iron Age samples  Table S4). Note, that the reference dataset of the distance calculations is smaller than that used for haplogroup-based analyses, because the whole mitochondrial genome datasets of ancient Asian populations are scarce in the current state of research.
The Multidimensional Scaling (MDS) plots were displayed based on linearised Slatkin FST values (Tables S4 and S5) that were calculated between the Avars and 22 ancient and 42 modern populations, respectively. The MDS plot of ancient populations does not show a clear chronological or geographical grouping of the populations; however, Asia and Europe are separated. The Avar elite group is close to Central-Asian populations from the Late Iron Age and Medieval period 17 in accordance with the individual FST results (Fig. 4).
The Avar period elite group exhibits a non-significant difference in genetic distance from the following modern populations: Uyghurs living in Northwest-China (Xinjiang, Turpan prefecture) (FST = 0.00656, p = 0.14929), Hazara (FST = 0.007, p = 0.24027) and Burusho (FST = 0.01748, p = 0.10949) populations of the Central Asian Highlands (Table S5). The MDS with Avars and modern populations display the differentiation of European, Near-Eastern, Central-Asian and East-Asian populations along coordinate 1. The investigated Avars are located close to Central-Asian and Inner Asian populations (Fig. 5). They cluster with modern Burusho and Hazara populations living in the Central-Asian Highlands, with modern Uyghurs living in Northwest-China, and the Han Chinese.
The maternal genetic lineages of the Avar individuals were further investigated through the Neighbour Joining clustering method (NJ). We separately counted and constructed phylogenetic trees of the 16 mtDNA haplogroups detected (see Table S6 (Figs. 6, S7a, S7c). The Buryats also stay on one branch on the Ward-type clustering tree (Fig. S5) 38 . The Buryats certainly represent a population that did not migrate much in the last millennia; therefore, they can be a good proxy for the Medieval population of South Siberia.
The genetic connection of Avar elite group with modern Uyghurs from Northwester-China (Xinjiang, Turpan prefecture) 39 is supported by the lowest genetic distance between Avars and Uyghurs compared to the other 42 modern populations studied (Table S5). This connection is displayed on the MDS plot too (Fig. 5). The Uyghurs are relatively near to Avars on the haplogroup frequency-based PCA plots along all three components; the Ward-clustering tree shows the connection as well (Fig. S4-S5, Table S3). The NJ trees of haplogroups C4b, D4i, D4j, D5b, F1b1, M7c1b2, R2, Y1a and Z1a also give evidence of the phylogenetic connection of certain individuals of the Avar elite group to the modern Uyghurs (Figs. 6 and S7b-h, S7o). However, it is important to emphasise that this population is not the descendent of the Medieval Uighur Empire, since modern Uyghurs gained their name only during the 20 th century.
The genetic distance is small between the investigated Avar elite and some modern-day ethnic groups from the Central-Asian Highlands (lying mostly in the territory of Afghanistan and Pakistan), namely the Hazara and Burusho, Pathan, Balochi and Brahui populations (Table  S5) 35 , the connections of which are shown on the MDS plot (Fig. 5) and on the haplogroup R2 tree (Fig. S7g) as well. Interestingly, the Hazara population, living mostly in Afghanistan and Pakistan today, probably has a Mongolian origin. Further Central-Asian individuals from the Pamir Mountains show phylogenetic connection with Avars on the D4j, R2 trees, and interestingly also on the European T1a1b tree (Figs. S7c, S7g, S7n).
The Central Asian Kazakhs and Kyrgyz cluster together with our Avar group on PCA plots and clustering tree (Figs. S4-5, Table S3). Unfortunately, they cannot be presented on the MDS plot because of the absence of population-level whole mitogenomic data. However, one modern Kazakh individual with the D4i haplogroup shares a common ancestor with an Avar period individual AC6 (Fig. 6).
Caucasian genetic connection is presented only by one sample on the phylogenetic tree of haplogroup H8a, where the AC17 sample from the Avar period is situated on one branch that also contains ancient and modern Armenians (Fig. S7j). This result correlates to the first European mention of the Avars in the Caucasus region by Menander Protector 2 .

Discussion
In 568 AD the Avars arrived in the Carpathian Basin, which was inhabited in the 6 th century by a mixed Germanic, Sarmatian and Late Antique (Roman) populations. Little is known about the maternal genetic composition of these local groups. The inhabitants of the Avar Qaganate had a heterogenic origin, the highest social stratum (presented by the high ranking individuals buried in the region of the Danube-Tisza Interfluve) shows a homogeneous cultural and anthropological character.
We produced valuable information regarding the social organisation of the elite stratum. Among the 25 studied individuals, we detect 23 different maternal lineages. These results show that the group was not organised by matrilineal social rules. Although the maternal genetic data of the investigated Avar group contains both Western and Eastern Eurasian elements, Eastern Eurasian maternal lineages dominate the spectrum in 64%. This suggests that not only a military retinue consisting of males migrated, but also an endogamous group of families.
There is a clear difference between the genetic pattern of the males and females. Of the 25 investigated samples, eight originated from female individuals and four have European haplogroups (that is 50% percent of the European lineages). In the case of the males, the ratio of European lineages is only 17.6% (three out of 17). This correlates well with the picture where maternal lineages were recorded in many historical nomadic societies and were as important as paternal descent 40,41 and where women had the right and the possibility to wield power (see the title of Qatun in ref. 2,42 ). However, the overrepresentation of European haplogroups in the female group contrasting with the small number of them in the male burials could be the result of archaeological discrepancy. The investigated elite group consists of almost male burials; the women belonging to the same social strata are archaeologically invisible. From the investigated sites in the Danube-Tisza Interfluve, only one female individual was buried with high value artefacts; the other richly furnished female burials are located in the Transtisza region (Fig. 2). Therefore, the males and females investigated here did not necessarily belong to the same social group, although they were part of the same communities (cemeteries). It is important to note that the Avar elite group under investigation does not belong to the first generation of conquerors of the Carpathian Basin. Based on our results, we suggest that the newcomer Avar elite was not admixed with the local 6 th century population for ca. a century and remained a consciously maintained closed society; only after that period did the number of intermarriages with local women increase. While certain maternal blood relations can be assumed by our analyses, the socially probably more important paternal contribution of kinship should be further investigated in the male lines.
Interestingly the elite group does not exhibit a genetic connection to the previously investigated small Avar period population from southeast Hungary 20 either, because the latter shows predominantly Eastern European maternal genetic and also different archaeological characters with Eastern European traditions (catacomb graves and partial animal depositions for e.g.). The genetic difference correlates well with the cultural and anthropological differences of this group and shows that the conquering Avar population was heterogeneous and differed in genetic makeup from the local population. We found that the Avar elite group is genetically different from the 6 th century Lombard period community of Szólád in Transdanubia 18 (Fig. 2), which has genetic connections to other ancient European populations (Fig. 3), and we can also assume that the other local Germanic populations also had a rather European type mtDNA variability in contrast to the studied Avar group. Comparing the Avar elite with later period datasets from the Carpathian Basin, only a few connections are observable. The mixed Avar-Slavic population from the 8 th -9 th centuries 21 does not show affinities to the Avar elite. The T1a1b phylogenetic tree contains one individual from the Hungarian conquest period (sample Karos III/14 in Neparáczki et al. 43 ) with identical sequence to the Avar HC9, which might indicate the genetic continuity of certain maternal lineages between the 7 th and 9 th -10 th centuries. The overall mtDNA composition of the Avar elite group and the 9-12 th century populations of the Carpathian Basin differ significantly, but whole genomic reanalyses of the latter samples are needed to prove these results.
Only loose connections are detectable between the new Avar mtDNA dataset and the available ancient populations in Eurasia. The comparisons are encumbered by the geographically and chronologically scattered nature of the available reference data. The Avar period elite shows the lowest and non-significant genetic distances to ancient Central Asian populations dated to the Late Iron Age (Hunnic) and to the Medieval period 17 , which is displayed on the ancient MDS plot (Fig. 4); these connections are also reflected on the haplogroup based Ward-type clustering tree (Fig. 3). Building of these large Central Asian sample pools is enabled by the small number of samples per cultural/ethnic group.. Further mitogenomic data from Inner Asia are needed to specify the ancient genetic connections; however, genomic analyses are also set back by the state of archaeological research, i.e. the lack of human remains from the 4 th -5 th century Mongolia, which would be a particularly important region in the study of the Avar elite's origin 44 .
The investigated elite group from the Avar period elite also shows low genetic distances and phylogenetic connections to several Central and Inner Asian modern populations. Our results indicate that the source population of the elite group of the Avar Qaganate might have existed in Inner Asia (region of today's Mongolia and North China) and the studied stratum of the Avars moved from there westwards towards Europe. Further genetic connections of the Avars to modern populations living to East and North of Inner Asia (Yakuts, Buryats, Tungus) probably indicate common source populations.
The genetic results verify the old historical and archaeological thesis on the Inner Asian origin of the Avar elite and disprove the hypotheses about the Central Asian Heftalite origin of the Avars. The historical sources suggest that this group was bringing titles and institutions of a Nomadic state to the Carpathian Basin to the discontent of their Asiatic heirs, the Turks. While the already mentioned idea of Avar -Rouran identity remained largely unchallenged, the Rouran origin of the Avar ruling elite does not automatically mean that the whole population ruled by Avar Qagans or even the whole Avar elite was composed exclusively of Rouran fugitives. It can rather be imagined as a composition of a second power centre in the steppes against the Western Turkic Qaganate resulting in the joining of different groups with no regard for the linguistic or ethnic affiliations who were discontent with the rise of this new nomadic empire in the mid-6 th century 2 .
The wealth and grave goods found in the single burial of a 50-60 year-old man at Kunbábony (AC2) is outstanding, not only compared to the standards of the early Avar period, but to the group of elite burials located in the Danube-Tisza Interfluve (Kunbábony -Bócsa group). The burial itself is often described as 'Qagan burial'; while it cannot be clearly proved archaeologically, the 2.34 kilograms of gold buried with him shows that he was indeed a prominent member of society (see Supplementary Information). Out of the 25 investigated samples, eight individuals belonged to this archaeologically defined group of high ranking men buried with similar weaponry covered with precious metal foils, ornamented belt sets and drinking vessels made of gold or silver (Csepel-AC1, Kecskemét-AC23, Kunbábony-AC2, Kunpeszér Grave 3-AC21, 8-AC22, 9-AC20, Petőfiszállás Grave 1-AC19, Szalkszentmárton-AC8). The artefacts found in these burials point to eastern cultural connections, but a more precise definition is hindered by the different distribution pattern of certain artefact types.
The crescent-shaped gold sheet from the Kunbábony burial have direct analogies from 5 th -6 th century burials attributed to the Rouran from Mongolia and Northern China (Inner Mongolia) where these artefacts were used as pectorals based on their documented position in burials (Yihe Nur in China 45 and Talyn Gurvan Kherem in Mongolia 44 ), although these items were regarded earlier as head-gears or diadems used as insignia 46 (Fig. 7).
Characteristic ostentatious edged weapons covered with golden or silver sheets were found in early Avar elite burials, and were probably used as prestige goods. These ring-pommel swords have good contemporaneous analogies from the Altai Region, but their distribution reached as far as China, Korea and Japan, while their representations can be found in mural paintings of Old-Samarkand (Afrasiab) 25,47 (Fig. 1).
The strong steppe connection of the early Avar period material culture is present on the level of the common people as well (see the rectangular-mouthed vessels and vessel with peaked and knobbed rim 48 ). The technological breakthrough of the iron stirrup appeared in Europe with the Avars; its importance was also showed by the cavalry reform of the Byzantine military after its large-scale distribution [49][50][51] . However, not only certain artefact types reached Europe during that time, but also some characteristic ways of deposition also spread: sacrificial assemblages so-called 'tainiks' (cache) composed of weapons and horse harnesses were buried in shallow pits in the Carpathian Basin during this period 8,47,52,53 (Fig. S8). The Inner Asian genetic connections of the common people of the Avar society also need to be tested in the future, analysing representative series of individuals.

Conclusion
All kinds of available evidence attest that at least a significant part of the Avar elite was of Inner Asian origin, not only in cultural but also in their genetic heritage. The detected Inner-Asian maternal genetic composition of the elite was preserved through several generations after the conquest of the Carpathian Basin.
This result suggests a consciously maintained closed society, probably through internal marriages oras opposed to the vivid picture of their flight described by the written sourcesintensive contacts with their regions of origin. However, in the Avar population, new elements appeared en route and after the conquest of the Carpathian Basin, showcasing how a successful military elite attracted and assimilated other groups, for example with Caucasian or European origin. The results also hold valuable information regarding the social organisation of the Avar period elite, as it suggests that not only a military retinue consisting of males migrated, but an endogamous group of families.
Our first genetic results on the leader class of the Avar society provides new evidence of the history of an important early Medieval Empire. Nevertheless, further genetic data from ancient and modern Inner Asian populations are needed to more exactly describe the genetic relations and the different waves of nomadic migration through the Eurasian steppe.

Ancient DNA work
Twenty-five samples were collected from ten different cemeteries dated to the Avar period (7 th -8 th centuries) according to their geographical position, grave goods, funerary custom and anthropological characteristics (see Table S1 and the site and grave descriptions in the Supplementary Information).
All stages of the work were performed under sterile conditions in a dedicated ancient DNA laboratory (Laboratory of Archaeogenetics in the Institute of Archaeology, Research Centre for the Humanities, Hungarian Academy of Sciences) following well-established ancient DNA workflow protocols 20,54 . The laboratory work was carried out wearing clean overalls, facemasks and face-shields, gloves and over-shoes. All appliances, containers and work areas were cleaned with DNA-ExitusPlus™ (AppliChem) and/or bleach and irradiated with UV-C light. All steps were carried out in separate rooms. In order to detect possible contamination by exogenous DNA, one extraction and library blank were used as a negative control for every batch of five/seven samples. Haplotypes of all persons involved in the ancient DNA work were determined and compared with the results obtained from the ancient bone samples.
Usually, pars petrous bone fragments were used for analyses, except for three individuals where teeth and long bone fragments were collected because the skulls were not preserved (Table S1).
The DNA extraction was performed based on the protocol of Dabney et al. 55 with some modifications described also by Lipson et al. 54 . DNA libraries were prepared using UDG-half treatment methods 56 . We included library negative controls and/or extraction negative controls in every batch. Unique P5 and P7 adapter combinations were used for every library 56,57 . Barcode adaptor-ligated libraries were then amplified with TwistAmp Basic (Twist DX Ltd), purified with AMPure XP beads (Agilent) and checked on a 3% agarose gel. The DNA concentration of each library was measured on a Qubit 2.0 fluorometer. In solution, the hybridisation method was used to capture the target short sequences that covered the whole mitochondrial genome, as described by Haak et al. and Lipson et al. 16,54 . Captured samples as well as raw libraries for shotgun sequencing were indexed using universal iP5 and unique iP7 indexes 57 . NGS sequencing was performed on an Illumina MiSeq System using the Illumina MiSeq Reagent Kit v3 (150-cycles).

Bioinformatics analyses
The final BAM files were obtained by a custom pipeline for both shotgun and capture datasets.
The paired-end reads were merged using SeqPrep master (https://github.com/jstjohn/SeqPrep), allowing a minimum overlap of 5 bp and minimum length of 15 bp. Then, the reads were filtered by size and barcode content using cutadapt version 1.9.1 58 , allowing no barcode mismatch, and a minimum length of 15 bp. BWA version 0.7.12-r1039 59 was used to map the capture sequencing reads to the Cambridge Reference Sequence (rCRS) and the shotgun sequencing reads to hg38 human genome assembly allowing a 3 bp difference in seed sequence, 3 bp gap extension and 2 gap opening per reads. The downstream analyses including SAM-BAM conversion, sorting, indexing and PCR duplicate removal was performed by samtools version 1.6 60 .
For capture data, indel realignment was performed using Picard tools version 2.5.0 (https://github.com/broadinstitute/picard) and GATK version 3.6 [61][62][63] . The presence of a deamination pattern was estimated by MapDamage version 2.0.8 (https://ginolhac.github.io/mapDamage/) and summarised in Table S1. Due to the relatively young age and half-UDG treatment of the samples required, the deamination frequency did not reach the minimum limit for software schmutzi in most cases; therefore, the final validation of the sequences was performed by eye on the final bam files. The shotgun sequencing provided a raw estimate of the endogenous content and genetic sex determination according to Haak et al. 16 . These data are summarised in Table S1.

Population genetic analyses
Standard statistical methods were used for the calculation of genetic distances between the investigated Avar elite population and Eurasian ancient and modern populations.
We excluded sample AC20 from any statistical and phylogenetic analyses because of the large number of haplogroup-diagnostic positions missing. Furthermore, we excluded sample HC9 from population-genetic statistical analyses because it belongs to a later period (end of 7 thearly 9 th centuries), and also excluded sample RC26 from sequence-based analyses because of a large number of unreadable and missing parts of the mitochondrial sequence, which inhibit the haplotype-based calculation of genetic distances.
The whole mitochondrial genomes of the samples were aligned in SeaView 67 by ClustalO with default options. Positions with poor alignment quality were discarded in the case of ancient and modern sequences as well.
Population pairwise FST values were calculated based on 3,945 modern-day and 932 ancient whole mitochondrial sequences using Arlequin 3.5.2.2 68 . The Tamura and Nei substitution model was used 69 with a gamma value of 0.62, 10,000 permutations and significance level of 0.05 in case of comparison between the investigated Avar elite population and 43 modern-day Eurasian populations (for the references see Table S5). For the comparison of 23 ancient populations, the Tamura and Nei model was performed with a gamma value of 0.599, 10,000 permutations and significance level of 0.05. The number of usable loci for distance computation in this case was 13,634 because 2,934 np had too much missing data (for the references see Table S4). The genetic distances of linearised Slatkin F ST values 70  For hierarchical clustering, Ward type algorithm 72 and Euclidean distance measurement method were used based on haplogroup frequencies of ancient and modern populations and displayed as a dendrogram in R3.4.1 (Figs 3 and S5). The same population-pools were used for this clustering as those used in the two PCAs.

Phylogenetic analysis
Phylogenetic analyses aimed to detect close maternal relative lineages within the group of samples belonging to a certain haplogroup. All available human mitochondrial genome sequences in NCBI (more than 33,500) were downloaded and sorted according to their haplogroup assignments. Multiple sequence alignment was performed for each sample set using the same procedure mentioned in the Population genetic analyses section, with an exception that only the 303-318 sites were discarded on this highly repetitive and indel prone region due to poor alignment quality. Then neighbour joining trees were calculated using the dnadist and neighbor subprograms of Phylip version 3.696 73 with default options. The Median Joining Network, which is a favoured method for analysing haplotype data, was rejected due to unresolvable ties. The trees were drawn in Figtree version 1.4.2 (http://tree.bio.ed.ac.uk/software/figtree). We did not use bootstrap analyses due to the low quantity of informative positions, which highly biases the supporting values.    Table S2.  Table S4.  Table S5.