Entwined African and Asian genetic roots of medieval peoples of the Swahili coast

The urban peoples of the Swahili coast traded across eastern Africa and the Indian Ocean and were among the first practitioners of Islam among sub-Saharan people1,2. The extent to which these early interactions between Africans and non-Africans were accompanied by genetic exchange remains unknown. Here we report ancient DNA data for 80 individuals from 6 medieval and early modern (ad 1250–1800) coastal towns and an inland town after ad 1650. More than half of the DNA of many of the individuals from coastal towns originates from primarily female ancestors from Africa, with a large proportion—and occasionally more than half—of the DNA coming from Asian ancestors. The Asian ancestry includes components associated with Persia and India, with 80–90% of the Asian DNA originating from Persian men. Peoples of African and Asian origins began to mix by about ad 1000, coinciding with the large-scale adoption of Islam. Before about ad 1500, the Southwest Asian ancestry was mainly Persian-related, consistent with the narrative of the Kilwa Chronicle, the oldest history told by people of the Swahili coast3. After this time, the sources of DNA became increasingly Arabian, consistent with evidence of growing interactions with southern Arabia4. Subsequent interactions with Asian and African people further changed the ancestry of present-day people of the Swahili coast in relation to the medieval individuals whose DNA we sequenced.

D � The exact sample size (n) for each experimental group/condition, given as a discrete number and unit of measurement D � A statement on whether measurements were taken from distinct samples or whether the same sample was measured repeatedly □ l'vl The statistical test(s) used AND whether they are one-or two-sided � Only common tests should be described solely by name; describe more complex techniques in the Methods section.
D � A description of all covariates tested D � A description of any assumptions or corrections, such as tests of normality and adjustment for multiple comparisons D � A full description of the statistical parameters including central tendency (e.g. means) or other basic estimates (e.g. regression coefficient) AND variation (e.g. standard deviation) or associated estimates of uncertainty (e.g. confidence intervals) □ l'vl For null hypothesis testing, the test statistic (e.g. F, t, r) with confidence intervals, effect sizes, degrees of freedom and P value noted � Give P values as exact values whenever suitable.
� D For Bayesian analysis, information on the choice of priors and Markov chain Monte Carlo settings � D For hierarchical and complex designs, identification of the appropriate level for tests and full reporting of outcomes � D Estimates of effect sizes (e.g. Cohen's d, Pearson's r), indicating how they were calculated Our web collection on statistics for biologists contains articles on many of the points above.

Software and code
Policy information about availability of computer code

Data
Policy information about availability of data All manuscripts must include a data availability statement. This statement should provide the following information, where applicable: -Accession codes, unique identifiers, or web links for publicly available datasets -A description of any restrictions on data availability -For clinical datasets or third party data, please ensure that the statement adheres to our QQ.)ky_ SNP array genotype data for 122 modern individuals newly reported in this study can be obtained from the Harvard Dataverse repository through the following link (https://doi.org/10.7910/DVN/NC28XW). BAM files of aligned reads can be obtained from the European Nucleotide Archive (accession no. PRJEB58698). Permits for collection and sequencing of each individual or group of individuals was obtained and described in the supplemental information as: "Songo Mnara: Samples were selected from excavated skeletal remains at Songo Mnara. Samples from adult burials included 1-2 teeth for isotopic study as well as one metatarsal or metacarpal for a DNA analysis. Infants were not sampled during excavations. One infant mandible recovered during analysis of domestic fauna I remains was also subjected to a DNA extraction. Teeth samples are stored at the University of Bristol. Bone samples are currently with the Reich laboratory at Harvard University; after this study is complete, they will be returned to Tanzania via the National Museums of Tanzania. Kilwa and Lindi: For Kilwa and Lindi, samples were selected following protocols outlined by Prendergast and Sawchuk (2018)

Mtwapa
Bone and tooth samples were taken over the course of the excavations at the site, which began under the direction of Kusimba in 1996. Most of the samples were collected by Monge and Williams during the 2010 season, however, when excavations focused on the cemetery located near the mosque. Tooth samples were collected for radiocarbon dating, stable isotope, and genetic analyses. Long bone fragments and rib samples were collected for stable isotope analyses. After each excavation season, the human remains were reburied, except for one individual remains are curated at the NMK. Any sample material remaining after analysis either has been or will be returned to Kusimba for curation at the NMK.

Manda
All samples were collected during a single excavation season in 2011-2012. Tooth samples were collected by co-authors J. Monge and S. Williams for radiocarbon dating, stable isotope, and genetic analyses. Long bone fragments and rib samples were collected for stable isotope analyses. The human remains were reburied the following year when osteological analyses were completed. Any sample material remaining after analysis either has been or will be returned to co-author C.M. Kusimba for return to the NMK.

Makwasinyi
Tooth fragment samples were collected by co-author C.M. Kusimba. The crania were left undisturbed in their respective localities. Any remaining sample material has been returned to co-author C.M. Kusimba for return to the NMK." See above.
We provide new dates for several ancient individuals to understand the context of the admixture patters we detect and to help us build a chronology of these individuals. We obtained dating results from the Pennsylvania State University Radiocarbon laboratory or the Illinois State Geological Survey. Radiocarbon ages were calibrated "in OxCal version 4.4.2 (Bronk Ramsey (2009), using either the lntCal20 (Reimer et al 2020) or SHCal20 (Hogg et al. 2020) calibration latitude depending on whether the site was north (Kenya) or south (Tanzania) of the equator." r8J Tick this box to confirm that the raw and calibrated dates are available in the paper or in Supplementary Information.

Ethics oversight
We obtained all permissions necessary for ancient DNA analysis from the respective countries from where the ancient individuals were buried or kept (see above), and we worked directly with communities that lived near the archaeological site and have traditions of inheritance from the ancient communities.
Note that full information on the approval of the study protocol must also be provided in the manuscript. l i