Multi-isotopic study of the earliest mediaeval inhabitants of Santiago de Compostela (Galicia, Spain)

Santiago de Compostela is, together with Rome and Jerusalem, one of the three main pilgrimage and religious centres for Catholicism. The belief that the remains of St James the Great, one of the twelve apostles of Jesus Christ, is buried there has stimulated, since their reported discovery in the 9th century AD, a significant flow of people from across the European continent and beyond. Little is known about the practical experiences of people living within the city during its rise to prominence, however. Here, for the first time, we combine multi-isotope analysis (δ13C, δ15N, δ18Oap, δ13Cap and 87Sr/86Sr) and radiocarbon dating (14C) of human remains discovered at the crypt of the Cathedral of Santiago to directly study changes in diet and mobility during the first three centuries of Santiago’s emergence as an urban centre (9th–12th centuries AD). Together with assessment of the existing archaeological data, our radiocarbon chronology broadly confirms historical tradition regarding the first occupation of the site. Isotopic analyses reveal that the foundation of the religious site attracted migrants from the wider region of the northwest corner of the Iberian Peninsula, and possibly from further afield. Stable isotope analysis of collagen, together with information on tomb typology and location, indicates that the inhabitants of the city experienced increasing socioeconomic diversity as it became wealthier as the hub of a wide network of pilgrimage. Our research represents the potential of multidisciplinary analyses to reveal insights into the origins and impacts of the emergence of early pilgrimage centres on the diets and status of communities within Christian mediaeval Europe and beyond.


Introduction
Pilgrimages to sites of spiritual significance remain one of the most important aspects of organised religion in the 21st century, attracting millions of people each year who often undertake journeys of thousands of kilometres (Collins-Kreiner 2010). The seasonal influx of pilgrims to particular sites can provide a major financial boost to local economies and bolster the political and cultural significance of certain key centres and nations (Collins-Kreiner 2010;Vijayanand 2012;Abuhjeeleh 2019). Pilgrimages can constitute an essential aspect of certain religions (Collins-Kreiner 2010) or represent an established custom which is not part of core religious tenets (Kim et al. 2016) and have a deep history in various parts of the world. Christian pilgrimage practices begin early, around the 4th century AD, with visits to sites in the Near East associated with the life and martyrdom of Jesus of Nazareth such as the Church of the Holy Sepulchre or the Mount of Olives (Freeman 2011). These continue to be visited today by Christians en mass (Collins-Kreiner and Kliot 2000). Into the early first millennium AD, however, pilgrim sites expanded widely across the Near East and into Europe with objects and body parts associated with Jesus of Nazareth, his disciples and various saints or martyrs acting as attractions for devotees seeking favours and redemption (Freeman 2011).
By the 9th century AD, through the influence of Charlemagne and the expansion of Christianity, much of western Europe became firmly gripped by a desire to attain and visit relics and undertake pilgrimages (Freeman 2011). One of the primary centres for pan-European pilgrimages was, together with Rome and Jerusalem, Santiago de Compostela (Galicia, Spain) (Fig. 1). During the first third of the 9th century AD, a purported revelation to a local bishop, Theodomir of Iria, led to the discovery of the sepulchre of the apostle Saint James the Great (López Alsina 2015). In Christian texts, St James was documented as being one of the most prominent apostles of Jesus of Nazareth, martyred by Herod of Agrippa in Jerusalem sometime between 41 and 44 AD (Sulai Capponi 2006). He became an Iberian Christian symbol of the fight against the 'infidel', boosted by different legends reporting battle apparitions during the wars against the Islamic Caliphates (Ramírez Pascual 2004). The supposed discovery of the burial place of Saint James the Great in its Cathedral thus made the city of Santiago de Compostela the destination of thousands Cristian pilgrims. Whilst the site also became an important place of burial, with archaeological investigation revealing a series of different tomb types ranging from the first temple on the site through to the peak of Santiago as a centre of pilgrimage (Guerra Campos 1982), the chronological and architectural development of the Cathedral area has remained relatively unstudied since the mid-20th century (Pérez Ramallo 2021).
Furthermore, although documentary and archaeological sources provide valuable information about the first inhabitants of Santiago de Compostela, as well as the types of foods that were available and how they were probably prepared for consumption, they cannot tell us, with certainty, from where the first inhabitants of the site and later pilgrims came from, the types of foods they ate and what are the differences existed between the individuals inhumed in the different areas of Santiago de Compostela. Stable isotope analysis of carbon (δ 13 C) and nitrogen (δ 15 N) has been regularly used in archaeological contexts to document dietary variation amongst human and animals (Froehle et al. 2012;Makarewicz and Sealy 2015;Webb et al. 2014) and, specifically, there is now a significant literature of stable isotope studies focused on dietary variation across the mediaeval Iberian Peninsula (i.e. Alexander et al. 2015;Jiménez-Brobeil et al. 2016;Mundee 2010;Pérez-Ramallo et al. 2022;Salazar-García et al. 2014). The method is based on the premise that the δ 13 C and δ 15 N values of human and other animal tissues are directly related to their diet (Ambrose and Norr 1993;Yoder 2012). Meanwhile, combination of stable oxygen isotope (δ 18 O ap ) and strontium isotope analysis ( 87 Sr/ 86 Sr) of tooth enamel provides a mean to investigate past human and animal mobility between geologically and hydrologically different regions (Makarewicz and Sealy 2015) and has also been applied in mediaeval Iberian contexts (López-Costas et al. 2021;Pérez Ramallo 2021).
δ 13 C variability in terrestrial ecosystems is mainly driven by differential isotopic discrimination against 13 C during CO 2 absorption by plants following the two dominant photosynthetic pathways, C 3 (e.g. wheat, barley, trees, shrubs and most temperate grasses) and C 4 (e.g. millet and most tropical grasses) (Smith and Epstein 1971). Whilst bone and dentine collagen δ 13 C primarily reflects protein contributions to the diet (Ambrose and Norr 1993;Howland et al. 2003;Jim et al. 2004), tooth enamel δ 13 C provides a 'whole diet' signature during the period of enamel formation  (Ambrose and Norr 1993), though the periods of life covered by each tissue will vary depending on the exact element sampled (Gregoricka et al. 2017). δ 15 N varies with trophic level, with changes of + 2 to + 6‰ between plants and herbivores and herbivores and their consumers being well-documented in both aquatic and terrestrial systems (Tieszen and Fagre 1993;DeNiro and Epstein 1981;Sealy et al. 1987). The long length of marine food chains leads to distinctively high δ 15 N in marine foods and consumers compared to their terrestrial counterparts. Marine resources also have higher δ 13 C values than terrestrial C 3 ecosystems that mimic those of C 4 plants, due to a different source of CO 2 for primary producers (Schoeninger and DeNiro 1984). Freshwater organisms also tend to have high δ 15 N, though their δ 13 C is highly variable (Dufour et al. 1999). Whilst these distinctions provide a firm basis for palaeodietary exploration, it is important to note that external environmental conditions such as temperature, aridity, rainfall or crop growing conditions (e.g. the application of manure) can also influence the δ 13 C and δ 15 N values (Amundson et al. 2003;Bogaard et al. 2007). Thus, the analysis of associated animals or plants remains important (Casey and Post 2011). δ 18 O ap is directly related to that of drinking water, which, in turn, is known to vary predictably geographically (Longinelli 1984;Lécolle 1985). This variation is driven by changes in the δ 18 O of precipitation and groundwater (Makarewicz and Sealy 2015;Webb and White 2014). Equations such as those presented by Longinelli (1984) or Levinson et al. (1987) are often used to convert tooth enamel carbonate or phosphate δ 18 O into a drinking water δ 18 O, yet significant errors and uncertainties are associated (Lightfoot and O'Connell 2016). Furthermore, changes in climate through time can affect local drinking water δ 18 O. As a result, when interpreting whether past human δ 18 O correlates to that of 'local' values, it is better to compare them to a local baseline of associated animal δ 18 O. Even then, intra-population variability is known to be significant (Lightfoot and O'Connell 2016). Strontium isotope ( 87 Sr/ 86 Sr) approaches to past human mobility rest on the premise that rocks of different ages and lithologies have different 87 Sr/ 86 Sr values, which do not alter as strontium is passed from the source rocks into the biosphere without isotopic fractionation (Evans et al., 2006). Although there is no mass-dependent fractionation from the bedrock into a given food chain, bedrock 87 Sr/ 86 Sr does not always correlate directly with bioavailable 87 Sr/ 86 Sr. Differential weathering of rocks with different 87 Sr/ 86 Sr ratios, as well as the geographic variability of hydrology and aeolian transport, leads to variations in the 87 Sr/ 86 Sr of soils and plants overlying a given distribution of rocks (Graustein 1989). From plants, Sr 2+ actively replaces Ca 2+ in consumer tissues as part of the process of nutrient uptake and excretion (Graustein 1989), with the amount of strontium incorporated into the skeleton believed to be directly reflective of that available from the local environment (Montgomery 2010). A robust bioavailable baseline is essential as the 87 Sr/ 86 Sr of an individual will be the combined consequence of all food consumed and all water imbibed, as well as the extent of the range over which an individual obtains food and drink (Montgomery 2010).
A multi-isotope approach has huge potential to provide direct insights into the origins and diets of individuals living at Santiago de Compostela during its foundation and expansion as a major mediaeval religious centre. Nevertheless, to date, there has been no extensive bioarchaeological and chronological study of the origin and development of the Cathedral and its necropolis at the heart of this Christian centre during the late first and early second millennium AD. Here, we aim to investigate the lifeways, status and origin of its first inhabitants during the birth and formation of Santiago de Compostela using δ 13 C and δ 15 N analysis of bone and dentine collagen and δ 18 O ap , δ 13 C ap and 87 Sr/ 86 Sr analysis of tooth enamel. Alongside new chronological information obtained using 14 C analysis of some of the same human remains, we examine the dietary and mobility patterns of the first mediaeval inhabitants and pilgrims of Santiago de Compostela and contrast the obtained results with the available historical sources and previous archaeological research to explore the wider economic, dietary and geographical situation of these populations.

Archaeological, historical and geographical background
After the discovery of the tomb of St James by the bishop Teodomirs, Alfonso II, King of Asturias, became the first pilgrim to visit Santiago de Compostela in 814 AD, establishing the first pilgrimage route, known as El Camino Primitivo (The Primitive Way) (López Alsina 2015), linking his capital in Oviedo to Santiago de Compostela. Between the 11th and 14th centuries AD, Santiago de Compostela received hundreds of thousands of pilgrims (Martínez García 2004;Gerrard and Gutiérrez-González 2018) arriving from across the continent via various Caminos de Santiago, pilgrimage routes that eventually sprawled across Spain, Portugal, France, Germany and other parts of Europe. The new, growing political and cultural status of Santiago de Compostela saw its local population expand, likely attracting people from around the region through its novel socioeconomic opportunities. The Black Death and the division of the Christian churches resulted in a decline in the number of pilgrims in the 15th century and numbers remained limited through to the 20th century (Miranda García 2002). Today, the city and its Caminos are UNESCO World Heritage sites, and 300,000 pilgrims visit Santiago de Compostela every year on spiritual journeys popularised in literature and film (Millán Vásquez de la Torre et al. 2010;González 2018;Álvarez-Sousa 2015).
Nowadays, Santiago de Compostela is the capital of the region of Galicia (Spain) in the northwest of the Iberian Peninsula (Fig. 1). The site has, following the Köppen classification, a temperate oceanic climate (Cfb), with mild to warm and moderately dry summers and mild, wet winters (Agencia Estatal de Metereología). A combination of winds from the Atlantic and the surrounding mountains provides Santiago de Compostela with one of the highest rainfalls in Spain at 1787 mm per year (Agencia Estatal de Metereología). Geologically, there are two parts of the city. The North and East of the city lie above a Complejo de Órdenes (the Ordes Complex), formed by metamorphosed ultrabasic rocks. By contrast, the west sits above granite intrusions, composed mainly of leucogranites of two micas and migmatites granitoid (Martínez Catalán et al. 1984). The Order Complex consists mainly of metasediments, along with some materials that come from the oceanic rock bottom itself, and some with volcanic origin: orthogenesis, amphibolite and gabbro intrusions (Martínez Catalán et al. 1984). These sedimentary materials derive mainly from Final Precambrian and Lower Palaeozoic materials, and their regional metamorphism occurred during the Hercynian orogeny in the Upper Palaeozoic (Fig. 2).
Based on previous archaeological work, three different phases of occupation have been distinguished for Santiago de Compostela: High Middle Ages (9th-12th centuries AD), Germanic or Early Middle Ages (5th-7th centuries AD) and Roman Ages (1st-5th centuries century AD) (Chamoso Lamas 1957;López Alsina 2015;Guerra Campos 1982). Between at least the 8th century AD, until the discovery of the apostolic tomb, the place was uninhabited, with small rural populations in its surroundings (López Alsina 2015). These phases of occupation at Santiago de Compostela were established via the archaeological excavations conducted under the current Cathedral of Santiago de Compostela at the end of the 19th century and between 1946and 1959(Chamoso Lamas 1957Guerra Campos 1982). During the latter archaeological works of the mid-20th century, the remains of the two previous temples, the first city wall and a mediaeval necropolis with a Roman origin were identified (Guerra Campos 1982) ( Fig. 3 and S1). This mediaeval necropolis (9th-12th centuries AD) corresponds to the cemetery that surrounded the temple created by order of Alfonso II after the discovery of St James's tomb (820/830-872 AD) (Chamoso Lamas 1957;López Alsina 2015;Guerra Campos 1982) and the one raised 40 years later over the first church, the basilica of Alfonso III (872-1075 AD) (López Alsina 2015). During these three centuries, the mediaeval necropolis spread significantly, resulting in an overlap of tombs caused by the temple's delimited location on top of a hill (Fig. S1). During the archaeological excavations conducted in mid-20th century, attempting to find the oldest part of the necropolis, the archaeologists destroyed a significant number of tombs (Guerra Campos 1982). Fortunately, the remaining graves and their individuals (n = 33) were respected without alterations. From those, 5 individuals (4 adults and 1 juvenile) were partly analysed via osteological techniques in 1972(Pedreira Barros 1972Carro Otero and Varela Ogando 1982). Since then, the necropolis of the Cathedral of Santiago de Compostela had lacked any new archaeological work, including the application of multidisciplinary approaches, with the exception of interpretive revisions of the existing data by Chamoso Lamas (e.g. Suárez Otero 2015).
In 2015, a pilot osteological study, combined with stable carbon (δ 13 C), nitrogen (δ 15 N) and oxygen (δ 18 O) isotope analysis, was carried out on eight individuals excavated in situ from the mediaeval necropolis of the Cathedral of Santiago de Compostela and analysed at the Stable Isotope Laboratory, University of Bradford (Bradford, the UK) (Pérez Ramallo 2015), along with a small sample of contemporaneous faunal remains. The measurement of human enamel carbonate demonstrated that 6 of the 8 individuals had childhood δ 18 O values suggesting a non-local origin (Müldner et al. 2009)for a summary of the method, see Britton (2020). In addition, incremental dentine collagen δ 13 C and δ 15 N produced using Beaumont et al. (2013) method, and with age assigned using , demonstrated changes in the diet of these individuals through the years of tooth formation and to rib bone collagen δ 13 C and δ 15 N in adulthood (Tab. S1). These data showed significant variations probably because of geographic mobility (NCS003) ( Fig. S2; Tab. S1) and/or change of social status, as well as potential short-term dietary patterns consistent with C 4 consumption during periods of famine (NCS006 and NCS007) ( Fig. S2; Tab. S1). Nevertheless, the sample size remained too small for definitive conclusions, and the chronology of the burials required confirmation.

The site of Santiago de Compostela and the human remains found in it
Following the pilot work in 2015, we sought to continue the investigation of the remaining individuals buried in situ at the mediaeval Necropolis of Santiago de Compostela, with the objective to better understand the lifeways, status and origin of its first inhabitants during the origins and formation of Santiago de Compostela as a religious hub. In 2017, we conducted new fieldwork examining the remains of individuals recovered during the mid-20th century ( Fig. 3 and S1), increasing the number of individuals analysed and analytical methods applied. We divided the necropolis into 3 zones in relation to their position relative to the Basilica of Alfonso III (Fig. 3). The first two zones (1 and 2) correspond to privileged areas around the entrances to the basilica, which were the locations closest to the relics, and in the case of zone 2 where different elite personages and bishops were buried (e.g. Teodomirs) (Guerra Campos 1982). Meanwhile, zone 0 is the broadest, most intensely occupied and most distant from Alfonso III's temple ( Fig. 3 and S1).
Osteological analysis is a non-destructive technique that is focused on human skeleton recovery and interpretation. We performed macroscopic observations using the naked eye and a magnifying lens. Sex assessment and age estimations of the skeletons were made using established morphological criteria of the skull, pelvis, tooth wear and long bones following Buikstra and Ubelaker (1994); Brooks and Suchey (1990); Brothwell (1981); Klales et al. (2012); Mays (2010); ; Lovejoy et al. (1985); Walker (2008) and Bass (2005). However, the amount of bone elements recovered, the local substrate that accelerated their degradation (López-Costas and Müldner 2016; Kaal et al. 2016), limited the osteological analysis. We were able to estimate the sex for a total of 9 female, 11 male and 13 indeterminate. These were divided into groups of age following the criteria of Buikstra and Ubelaker (1994) as follows: 2 children, 7 young adults, 7 middle adults and 4 old adults. The remaining individuals (n = 14) were classified here as indeterminate adults (Table 1).
To establish the chronology of the buried individuals, and the phases of occupation, we employed radiocarbon dating. We radiocarbon-dated 9 human bone samples in order to confirm the chronology and understand the development of the necropolis over time alongside the Cathedral complex ( Fig. 4; Tab. S2). Of these, 7 samples were analysed at the Oxford Radiocarbon Accelerator Unit (ORAU), Oxford, UK. These represented human bone from the tomb types 'Sarcophagus' (stone sarcophagus), 'Cists' and 'Anthropomorphic' (rectangular, oval or anthropomorphic tombs excavated into the geological substrate with stone walls or rectangular slabs, covered with thick or thin slabs, respectively), distributed amongst the three areas of the necropolis (Figs. 3, 5, and S1). Meanwhile, 2 samples of bone from zone '0', from tombs type 'Cists' and 'Rectangular' (rectangular tomb with irregular stone walls and cover, with a soil base), were sent to Beta Analytic Inc. Radiocarbon Laboratory, Florida, USA. The full protocol and standards used in each laboratory are reported in the supplementary information text S1. Radiocarbon determinations were calibrated using OxCal v4.4 and the IntCal20 calibration curve (Reimer et al. 2020).
The radiocarbon dating results suggest that the individuals analysed in this study date to between the 9th and 12th centuries AD ( Fig. 4; Tab. S2) and have confirmed that the different tomb types identified during the first excavations during the mid-20th century excavations (Guerra Campos, 1982) represent a chronological sequence of necropolis use. Based on our dates, and existing contextual knowledge, the so-called Doble Estola sarcophagus (Guerra Campos, 1982), here classified as tomb type 'Sarcophagus' (Figs. 4, 5, and S1; Tab. S2), appears to represent individuals buried during the first decades after the discovery of St James' remains in the 9th century AD. Although a significant number of these tombs were reused, with remains of more than one individual being discovered in some cases within (NCS001, NCS023, NCS024, NCS145 and NCS258), they may even be related to the first temple raised on the site by Alfonso   1998). After tomb type 'Sarcophagus', the 14 C results and archaeological context show that tomb type 'Cists' appears from at least the 10th century AD, coexisting with tomb type 'Anthropomorphic' during the first half of the 11th century AD (Figs. 4, 5, and S1; Tab. S2). Type 'Rectangular' tombs date to the latest period of necropolis use (11th-12th centuries AD) (Figs. 4 and 5, and S1; Tab.S2). Tombs of this type had a rectangular shape and were made from irregular-sized stones and a base of soil and rubble, lying over and between the remains of the first city wall and some early domestic structure, and may be connected to an asylum that was built between the ninth and the 10th centuries AD (López Alsina 2015). The obtained radiocarbon determinations confirm a chronology spanning the development of the mediaeval necropolis of Santiago de Compostela across three broad stages, from the Tombs typology at the mediaeval necropolis of Santiago de Compostela. A Sarcophagus (granite sarcophagi); B cists (tombs with small stones wall or cists, and rectangular or oval-shaped covered with slabs); C anthropomorphic (anthropomorphic tombs excavated in the rock and covered with slabs); and D rectangulars (those that have a rectangular shape and made with irregular size stones) temple of Alfonso II (820/830-872), through the shrine of Alfonso III (872-1075), up to the development of the Romanesque Cathedral (1075-1211). The direct or indirect consumption of marine proteins by humans could impact 14 C quantification, leading to offsets between measured radiocarbon ages from true chronological ages as a consequence of the marine reservoir effect (Fernandes et al. 2016). We face challenges in estimating the exact influence of marine protein on an individual's diet and, therefore, the reliability of radiocarbon estimations using Bayesian modelling. Nevertheless, the radiocarbon dating results fit with the relative chronology expected based on archaeological and historical discussion, despite the fact that many tombs may have been reused (NCS001, NCS005, NCS006, NCS023, NCS024, NCS145 and NCS258). Furthermore, except for individuals NCS154 (δ 15 N 12.3‰ and δ 13 C -17.6‰), and NCS258b (δ 15 N 12.2‰ and δ 13 C -17.8‰), there is limited obvious evidence for marine resource consumption in the diets of individuals selected for radiocarbon dating (Table 1 and S2). Our results show a more intense and complex use of space than was previously determined by archaeological investigations in the mid-20th century (Guerra Campos 1982).

Materials and methods
To reconstruct the diet and mobility for 33 individuals located in situ at the mediaeval necropolis (9th-12th century AD), we employed carbon (δ 13 C), nitrogen (δ 15 N), oxygen (δ 18 O) and strontium ( 87 Sr/ 86 Sr) isotope analyses. To support the interpretation of these results, we compared them with isotopic analyses performed on faunal samples from the necropolis of Santiago (n = 12) and 32 faunal samples from the nearest Rocha Forte Castle (13th to 15th centuries AD, Santiago de Compostela). The results provide noteworthy insights into the resource access and cultural behaviours.

Materials
To provide insights into the diets, social status and origins of individuals buried in the Santiago Cathedral necropolis, we undertook multi-isotopic analysis ( 87 Sr/ 86 Sr, δ 18 O, δ 13 C, δ 15 N) of 33 human and 41 fauna. From the 33 individuals, we selected 2 osteological samples per individual for δ 15 N and δ 13 C analyses. Following the rejection of samples that failed to meet collagen quality requirements (C:N atomic ratios, % collagen), we were left with a total of 34 samples from 25 individuals (Table S3). Due to the relative lack of faunal samples from the necropolis of Santiago (n = 9), we expanded our faunal baseline by adding 32 new individuals from Rocha Forte Castle (13th to 15th centuries AD, Santiago de Compostela) that is thought to represent the provisions available to the city as a whole during this later period (López-Costas and Teira Brión 2014). Furthermore, to better determine a robust bioavailable 87 Sr/ 86 Sr baseline for the city, in addition to faunal teeth from Rocha Forte Castle (n = 15), we analysed ten shells of modern (n = 7) and archaeological (n = 3) snails (Table 2) as they are considered one of the most appropriate materials for integrating local bioavailable strontium (Maurer et al. 2012; Bartelink and Chesson 2019). These were selected from diverse points of the city based on geological substrate differences in addition to the archaeological fauna (Table 2; Fig. 2).
We sought to obtain rib samples for each individual located in situ at the Cathedral of Santiago's necropolis for paleodietary analysis as good indicators of diet for the last 5-10 years of life (Bartelink and Chesson 2019). However, for some individuals, there was a lack of ribs present or evident taphonomic degradation of the bone. As a result, we were forced to seek other bone elements for some individuals (n = 8) for δ 13 C and δ 15 N analysis-a metatarsal, three skull fragments and four teeth (Table 1 and S1). For the tooth dentine and enamel analyses, to avoid breastfeeding influences, we sampled teeth which develop after the first 2 years of life (11 s molars and two premolars). Additionally, according to their availability, we sought to analyse a tooth and rib from the same individual (n = 9), avoiding those teeth that present caries or cavities that could alter isotopic values. Through these two elements, we obtained collagen reflecting the individual's diet during their earlier (tooth) (Wright and Schwarcz 1999) and later years of (rib) of life (Fahy et al. 2017;Hedges and Reynard 2007;Hill 1998). By sampling the tooth enamel δ 13 C ap as well as the dentine, we can also study the differences between whole diet and protein-based contributions to δ 13 C, respectively (Fernandes et al. 2012).
For paleomobility, tooth enamel was sampled for δ 18 O and 87 Sr/ 86 Sr analysis (Table 1). This was mostly conducted on the enamel from the same tooth analysed for paleodietary studies. Thus, the palaeomobility dataset was mainly composed of second molars except for two premolars. However, for 87 Sr/ 86 Sr analysis, for seven individuals, we took different samples as second molars were not available (e.g. NCS001, NCS006a, NCS011 or NCS034) that still reflected a young age (Table 1). In some individuals (n = 9), the enamel of more than one tooth was sampled to contrast different moments of the individual's early life (Table 1). In total, we sampled 34 human teeth and bones for δ 13 C and δ 15 N collagen analysis, and 29 and 33 human teeth for δ 18 O and δ 13 C ap and 87 Sr/ 86 Sr analysis, respectively.

δ 13 C and δ 15 N analysis of bone and tooth collagen
Collagen extraction for δ 13 C and δ 15 N analysis was conducted at the Max Planck Geoanthropology (formerly the Max Planck Institute for the Science of Human History),  Jena, Germany. Collagen was extracted following the methodology reported by Richards and Hedges (1999). Bone and root tooth samples (approx. 1 g) were broken into small pieces and any adhering soil was removed by abrasion using a sandblaster. Samples were demineralised by immersion in 0.5 M HCl for ~ 7 days. Once demineralisation was complete, samples were rinsed three times with ultra-pure H 2 O. The residue was gelatinised in pH3 HCl at 70 °C for 48 h and the soluble collagen solution Ezee-filtered to remove insoluble residues (Brock et al. 2013). Samples were lyophilised in a freeze dryer for 48 h. Where sufficient material was available, approximately 1.0 mg of the resulting purified collagen weighed in duplicate into tin capsules for analysis. The δ 13 C and δ 15 N ratios of the bone collagen were determined using a Thermo Scientific Flash 2000 Elemental Analyser coupled to a Thermo Delta V Advantage mass spectrometer. Isotopic values are reported as the ratio of the heavier isotope to the lighter isotope ( 13 C/ 12 C or 15 N/ 14 N) as δ values in parts per mill (‰) relative to international standards, VPDB for δ 13 C and atmospheric N2 (AIR) for δ 15 N. Results were calibrated against international standards (IAEA-CH-6 Sucrose, IAEA-N-2 Ammonium Sulphate and USGS40 L-Glutamic Acid); USGS40 δ 13 C = − 26.4 ± 0.1‰, δ 13 C = − 26.4 ± 0.0‰, δ 15 N = − 4.4 ± 0.1‰, δ 15 N = − 4.5 ± 0.2; IAEA N2 δ 15 N = 20.2 ± 0.1‰, δ 15 N = 20.3 ± 0.2‰; IAEA C6 δ 13 C = − 10.9 ± 0.1‰, δ 13 C = − 10.8 ± 0.0‰. Replicate analyses of standards suggest that machine measurement error is c. ± 0.1‰ for δ 13 C and δ 15 N. Overall measurement precision was studied through the measurement of repeat extracts from a fish gelatine standard (n = 20, ± 0.1‰ for δ 13 C and ± 0.1‰ for δ 15 N). The atomic C:N ratio along with the collagen yields was used in order to determine the quality of collagen preservation. Collagen yields over 1 wt% were considered acceptable for carbon and nitrogen values (van Klinken 1999), whilst the C:N ratio should have a range from 2.9 to 3.6 (DeNiro 1985).

δ 18 O ap , δ 13 C ap and 87 Sr/ 86 Sr analysis in tooth enamel and snail shells
Tooth enamel for 87 Sr/ 86 Sr, δ 18 O ap and δ 13 C ap analysis was removed from clean locations using a tungsten drill, with the vertical edge of the occlusal surface being sampled to provide a long-term average signal. Powdered enamel for δ 18 O ap and δ 13 C ap analysis was collected and placed in a 1.5-mL Eppendorf tube. Samples were treated with 1 mL of 1% NaClO for 60 min then rinsed with MilliQ water three times to remove any remaining bleach and ultimately treated with 0.1 M acetic acid for 10 min. Again, followed by rinsing three times with MilliQ water to remove any remaining acid. Enamel samples were then covered, frozen and lyophilized for 4 h. From each sample, approximately 3 mg enamel powder was weighed into 12 mL borosilicate glass vials and sealed with rubber septa. Samples where then flush/filled with helium at 100 mL/min for 10 min. Following reaction with 100% phosphoric acid, gases evolved from the samples were analysed to stable carbon and oxygen isotopic composition using a Thermo Gas Bench 2 connected to a Thermo Delta V Sr analysis of enamel and snail shells was conducted at the Department of Geological Sciences of the University of Cape Town, South Africa. The sample preparations process varied depending on the material. Snail shells were cleaned and digested. Samples of ca. 20 mg were treated with 2 mL of 65% HNO 3 , leaving it in closed Teflon beakers on a hot plate at 140 °C overnight. One millilitre 2 M HNO 3 was added to the samples and placed again on the hot plate at the same temperature. Samples were treated then with 2 mL 2 M HNO 3 and, from this solution, 1.5 mL was centrifuged for 20 min. This 1.5 mL of sample was the solution used to isolate the strontium fraction through chemical separation using 0.2 mL of Sr. Spec resin in Bio-Spin Disposable Chromatography Bio-Rad columns according to the method of Pin et al. (1994). The human and animal tooth enamel samples were digested in HNO 3 , calculating the Sr concentration levels for possible diagenesis. After analysing the enamel concentrations, samples were treated following Pin et al. (1994) starting by adding 2 mL of 65% HNO 3 . The separated strontium fraction was dried down, dissolved in 2 mL 0.2% HNO 3 and diluted to 200 ppb Sr concentrations for isotope analysis using a Nu Instruments NuPlasma HR MC-ICP-MS. All 87 Sr/ 86 Sr data are referenced to a value of 0.710255 for bracketing analyses of the international standard SRM987. Instrumental mass fractionation is corrected using the exponential law and a value of 0.1194 for 86 Sr/ 88 Sr. Isobaric interference by Rb at 87 amu is corrected using the measured 85 Rb signal and the natural abundance ratio of 85 Rb/ 87 Rb. Background Sr levels were assessed using total procedural blanks, which averaged < 250 pg Sr and therefore neglectable.

Statistical analysis
Mann-Whitney U (p same-mediane ) test with a Monte Carlo permutation was applied to δ 13 C, δ 15 N, δ 18 O ap and δ 13 C ap data obtained in this study when comparing differences between two groups.
For several sample tests (3 or more groups), we used the Kruskal-Wallis test for sample comparison followed by a Mann-Whitney pairwise test with a Bonferroni correction. We employed a 5% significance level (α). These tests were used to determine if there were significant differences based on grave location and type, biological sexes, local and no-local individuals identified on the basis of 87 Sr/ 86 Sr and variations between teeth and ribs from the same individuals (Tab. S4 and S5). We also tentatively convert our δ 18 O ap data to δ 18 O dw as one way of exploring variation within the dataset, despite the margin of error expected Lightfoot and O'Connell 2016). Human enamel δ 18 O ap was converted to δ 18 O dw following Chenery et al. (2012) and Daux et al. (2008). The resulting data were compared to modern local water values (Araguas-Araguasa and Diaz Teijeiro 2005; http:// www. water isoto pes. org) (Fig. S3). In addition to this, we employed two statistical assessments. Boundaries of intra-sample variation based on two measurements of scales were defined: ± 2 standard deviation (2SD) from the mean and Tuke's inter-quartile range method (IQR) considering 1.5xIQR and 3xIQR (Lightfoot and O'Connell 2016). The free software 'PAST' was used for all statistical analyses (Hammer et al. 2001). Table S2 display the radiocarbon results for samples dated in this study whilst δ 15 N, δ 13 C, δ 18 O and 87 Sr/ 86 Sr results for human and fauna samples can be found in Tables 1 and 2, respectively. δ 13 C and δ 15 N Incremental Dentine data can be found in Table S1. δ 13 C and δ 15 N and collagen quality indicators for each analysed sample, as well as the results of the statistical tests, can be found in Tables S3 to S8 in the Supplementary Information. We did not observe a distinction between sexes concerning their grave placement ( Fig. 2 and S1; Tab. S4), which rather appears to be associated with socio-economic status. All individuals were buried following the standard Christian rite (east-west orientation, arms stretched out and with the hands over the stomach or pelvis) of the time without evidence for the presence of other faiths.

Faunal δ 15 N and δ 13 C from collagen and δ 13 C ap
Stable isotope results for all analysed terrestrial fauna from Rocha Forte Castle ( Fig. 6 and 7; Table 2 and S6) (δ 15 N and δ 13 C n = 15, and C ap n = 18) range between 4.7 and 9.1‰ for δ 15 N (Mean ± SD = 6.8 ± 1.5‰), between − 22.3 and − 18.5‰ for δ 13 C (mean ± SD = − 21.3 ± 1.1‰) a n d b e t we e n − 1 5 . 2 a n d − 8 . 2 ‰ fo r δ 1 3 C a p (Mean ± SD = − 13.1 ± 1.6‰). Statistical testing demonstrates a difference in δ 13 C between purely herbivorous domesticated taxa (Bos taurus and ovicaprine) and omnivores (Sus scrofa) (Mann-Whitney pairwise test with Bonferroni correction p-value < 0.05) (Tab. S7), though there was no difference in δ 13 C ap between Sus scrofa and Cervus The collagen values from the terrestrial fauna excavated from the Cathedral of Santiago itself (n = 9) show a δ 15 N range from 3.9 to 5.6‰ (mean ± SD = 4.9 ± 0.5‰) and δ 13 C range from − 21.6 to − 21.2‰ (Mean ± SD: − 21.4 ± 0.1‰). Overall, the terrestrial fauna excavated from the Cathedral shows lower δ 15 N values (Mean ± SD = 4.9 ± 0.5‰) w h e n c o mp a re d to t h a t f ro m Ro ch a Fo r t e (Mean ± SD = 6.8 ± 1.5‰), something also seen in Bos taurus and Ovis orientalis aries/Capra aegagrus hircus identified at both locations (Table 2 and S6). δ 13 C differences between the two sites are only observed in Bos taurus, however. This is supported by statistical testing which found a significant difference for δ 15 N and δ 13 C between the terrestrial fauna (Bos taurus and ovicaprids) between sites (p < 0.05), and for Bos taurus (Mann-Whitney test with Monte-Carlo permutation p-value < 0.05) in particular (Tab. S8).

Fauna and human 87 Sr/ 86 Sr and δ 18 O ap data
The most appropriate method for establishing a local bioavailable Sr isotopic signature for a given past site is still the subject of an ongoing debate that has occurred over the last few decades without clear consensus (Larsson et al. 2020;Scaffidi et al. 2020;Grimstead et al. 2017). Unfortunately, Santiago de Compostela's underlying bedrock geology is highly variable even over short distances, and the geological substrate is heterogeneous (Fig. 2). Variation in local growing conditions and the underlying geological variability of Santiago de Compostela would necessitate a widespread sampling strategy to produce an appropriate Sr baseline (Britton et al. 2020). Many scholars have recently argued that the preferred method to define a local 87 Sr/ 86 Sr range is to analyse surface waters, soils, plants and archaeological fauna in the locality of a given site (Larsson et al. 2020;Grimstead et al. 2017). However, Holt et al. (2021) described the use of plants for mapping strontium ratios as problematic because of the point-bias, a consequence of the idiosyncrasies of geological and environmental processes. Therefore, a single plant may show a ratio that is not representative of the area where it grows. This can only be solved by the analysis of a large number of samples, something difficult as a result of the significant costs involved (Holt et al. 2021). Besides, the 87 Sr/ 86 Sr ratios may vary between plants based on the type and area of their roots (Britton et al. 2020;Hartman and Richards 2014), local environmental factors such as soil types, precipitation regimes (Holt et al. 2021) and windblown dust (Blank et al. 2018). Another method that may not reflect terrestrial bioavailable strontium as closely as other archives is water (Hartman and Richards 2014;Hamilton et al. 2019). This, together with other approaches as soil and plants, may be affected by anthropogenic activities (Holt et al. 2021). The use of fertilisers, nutrients, plants cultivated elsewhere (e.g. urban parks) or indirect alterations such as contamination may lead to unrepresentative local bioavailable Sr isotopic signatures when compared to the past (Holt et al. 2021;Casado et al. 2019).
The Cathedral of Santiago de Compostela is located in the modern city centre. Thus, the study area is today fully urbanised. Moreover, the water in Santiago de Compostela has very serious pollution problems (Suárez et al. 2009;Alertan… 2006) that can impact the 87 Sr/ 86 Sr ratios (Casado et al. 2019). Therefore, in order to establish the best baseline available possible, we first sought to analyse the archaeologically available domestic fauna, from the Cathedral itself and nearby Rocha Forte Castle, as better integrators of locally available bioavailable strontium sources for humans in the past (Holt et al. 2021;Adams et al. 2019). This proved difficult as faunal teeth were only available from the Rocha Forte Castle which is located some distance from the Cathedral and dates to a later time period when fauna could be arriving from outside of the local area given the position of the castle which sat at the node of trade routes during the 13th and 15th centuries AD (López-Costas and Teira Brión 2014). Consequently, we also decided to establish another bioavailable 87 Sr/ 86 Sr dataset using modern and archaeological wild snails collected across the city following the variation in its geological substrate and those discovered at the mediaeval necropolis of Santiago de Compostela (9th-12th centuries AD), respectively (Table 2; Fig. 2). Snails, after plants, are recommended by many researchers as having 87 Sr/ 86 Sr values that broadly correspond with the lithological unit/soil values of various square metres over a few years and are more likely to integrate a wider geographical range (Blank et al. 2018;Britton et al. 2020;Holt et al. 2021). However, some scholars have debated the feasibility of using snail shells to develop an isoscape. Hartman and Richards (2014) suggested that their 87 Sr/ 86 Sr ratios map shallow-rooted plants more closely, as opposed to deep-rooted plants. Moreover, as with plants or soil, snail shells can yield 87 Sr/ 86 Sr ratios strongly affected by rainwater (Evans et al. 2010). Given the complexity of the task, to ensure the viability of the method used, we also compared the strontium isotope composition of our modern local (n = 7) and archaeological (n = 3) snail shells, which range between 0.709229 and 0.712958 (Table 2; Fig. 2). This range is expected based on the underlying bedrock from the closets sites analysed (Voerkelius et al. 2010;Bea et al. 2003;James et al. 2022;Waterman et al. 2014) with the Lower Palaeozoic materials having 87 Sr/ 86 Sr values closer to marine values (oceanic water analysis has 87 Sr/ 86 Sr ranging between 0.709 and 0711) (Voerkelius et al. 2010), whilst the Hercynian granitic rocks from the Iberian Peninsula interior are expected to have more radioactive values approaching 0.713 (Bea et al. 2003;James et al. 2022;Waterman et al. 2014).
The conversion of our δ 18 O ap values to δ 18 O dw and their comparison with the modern local water values (− 5 ± 2‰) (Voerkelius et al. 2010) (Fig. S3) allow us to identify 4 human individuals (NCS002: LM 2 /37 = − 5.4; NCS025: LM 3 /38 = − 6.2; NCS032: LP 2 /25 = − 6.5 and NCS258b: RM 2 /47 = − 4.7) that potentially come from outside of the region. However, using the ± 2 standard deviation (2SD) from the mean and Take's interquartile range method (IQR) approaches, considering 1.5xIQR and 3xIQR (Lightfoot and O'Connell, 2016), we were only able to identify two human individuals (NCS032 and NCS025) as potentially growing up elsewhere. These are the only two individuals where both methods (δ 18 O ap and 87 Sr/ 86 Sr) converge on identifying them as 'non-locals'. No statistically significant differences were observed between zones or sex for δ 18 O ap (Mann-Whitney test with Monte-Carlo permutation p-value > 0.05) (Tab. S4). There were also no statistically significant differences observed for local and non-local individuals, identified on the basis of 87 Sr/ 86 Sr, in terms of δ 18 O ap (Mann-Whitney test with Monte-Carlo permutation p-value > 0.05) (Tab. S4).

From the locus sanctus to the civitas
Our results show a more intense and complex use of the space at the site of the Cathedral than was previously determined through archaeological investigations in the mid-20th century (Chamoso Lamas 1957;Guerra Campos 1982). Overall, the archaeological context and the radiocarbon dating results suggest that there was reutilisation of, and changes in, the original position of most of the tombs related to the first temple (Sarcophagus tombs) (Fig. 3, 4, 5, and S1). This could be a consequence of the continuous alteration of the burial layouts with the construction of successive temples and/or reconstruction after the attacks of Almanzor (Chamoso Lamas 1957;Guerra Campos 1982;López Alsina 1990). In addition, the expansion of the graveyard from the second half of the 11th century AD destroyed the first domestic buildings of the original city centre (Chamoso Lamas 1957;Guerra Campos 1982;López Alsina 1990) (Fig. 3 and S1) and led to the superposition of more recent tombs (tombs type 'Rectangular'), over the previous ones (sarcophagus, cists and anthropomorphic tombs) (e.g. NCS014 and NCS034), with the appearance of a second, and even a third, level of graves (Figs. 3, 5, and S1).

A city made by immigrants
Based on the snail shells analysed from Santiago de Compostela's different geographical substrate zones, we tentatively determined that 87 Sr/ 86 Sr local bioavailable values range between 0.709229 and 0.712958 ( Fig. 7; Table 2). Based on these parameters, 14 of 26 human individuals analysed can be classified as non-local to the Santiago settlement area (Tables 1 and 2; Fig. 7). This suggests that a significant number of individuals were moving into Santiago following childhood. Notably, however, a number of the fauna sampled from Rocha Forte Castle also appear to be 'non-local' using these parameters, with the exception of two ovicaprines, one Equus ferus caballus, and two Bos taurus (Table 2). This could indicate that much of the 'nonlocality' seen amongst the human individuals is a product of the consumption of animal resources coming from elsewhere (NCS009 and NCS030) as part of an urban network. Santiago de Compostela of the 9th century AD was a collection of buildings of a religious nature that emerged around the apostolic tomb (López Alsina, 2015). Thus, a high degree of non-locality (at least away from the immediate central area) is expected for individuals buried at the site during this time. Nine of 12 individuals that have shown 87 Sr/ 86 Sr values defined here as 'non-local' were buried in tombs type 'Sarcophagus' (n = 5) and 'Cists' (n = 4), which, according to the 14 C results, correspond to the first settlers buried between the 9th and 10th centuries AD, and 10th and 11th AD, respectively (Figs. 3, 5, and S1; Table 1 and S2).
The nucleus of Santiago de Compostela progressively acquired urban characteristics, particularly during the 11th century AD (López Alsina 2015). From at least the eleventh century AD onwards, Santiago de Compostela grew as a trade centre (López Alsina 2015), in parallel with urban developments across northern Iberia more generally at this time (Martínez García 2004;Passini 1993). It is only in the second half of the 11th century that widespread exchange in animals across great distances is likely to have become routine for individuals living in and around Santiago de Compostela, with the potential that external food sources could have perhaps become consistent enough to supply the city and its inhabitants (López Alsina 2015). Rocha Forte Castle's fauna is witness to this, highlighting Santiago de Compostela's relevance as a commercial centre at the end of the Middle Ages. Here, δ 15 N and δ 13 C variation within the Rocha Forte Castle fauna itself (δ 15 N 6.2 ± 1.6‰; δ 13 C − 21.4 ± 0.9‰) contrasts that of the earlier Cathedral fauna from the 9th-11th centuries AD (δ 15 N 4.9 ± 0.5‰; δ 13 C − 21.3 ± 0.1‰), suggesting a growing appearance of animals raised in regions with different soils, manure inputs, climates and latitudes or altitudes (Drucker 2008;Männel et al. 2007). Indeed, what seems more probable is that the mobility observed in the human population at the founding of Santiago was part of an increasingly solidified network of trade as time went on, with an exchange in animals being built upon earlier movements of people to this site of increasing cultural and political importance.
The 87 Sr/ 86 Sr values, between 0.714730 and 0.716632, observed in several human individuals from Santiago de Compostela (NCS002, NCS024a, NCS025, NCS026 or NCS033) that fall outside the immediate 'local' range we defined on the basis of mollusc shells are found across large areas of the western half of the Iberian Peninsula, including the northwestern region surrounding Santiago de Compostela, following the models of Hoogewerff et al. (2019) and Bataille et al. (2020) as well as those provided by Díaz-Zorita Bonilla et al. (2018) from La Pijotilla, Badajoz (0.714175-0.715382) ( Fig. 1; Tab. S9). Several of the individuals with these values were buried in graves type 'Sarcophagus' (NCS024a, NCS025 and NCS026), probably the first settlers of the new religious centre (NCS023: 769-891 cal AD; NCS146: 772-954 cal AD). Furthermore, individuals NCS010, NCS016, NCS022, NCS032, NCS039, NCS154a and NCS258b yielded 87 Sr/ 86 Sr values between 0.713525 and 0.713785, fitting with those from Bolores, Extremadura (Portugal) (0.7090750-0.713280) (Waterman et al. 2014), or the Madrid Region (0.707 to 0.713) (Díazdel-Río, 2017) (Tab. S9). Interestingly, as it has been noted historically (Martínez Díez 2011;Molénat 2019;Cenname 2016), between the 9th and 10th centuries AD, the northern peninsular area corresponds to the kingdom of Asturias which became a refuge for Christians, especially clergymen, who fled from areas dominated by Islamic political powers. This data may highlight that some of these supposedly 'non-local' individuals from between the 9th and 10th centuries AD were, in fact, a product of populations coalescing at a growing socio-economic centre, rather than being 'pilgrims' from distant areas. This is further supported by the observable non-locality in most δ 18 O ap human values obtained (except for NCS032 and NCS025). The oxygen isotopic data reveals that the potential 'non-locals' identified by strontium previously lived in a region with similar environmental conditions to those seen in Santiago of Compostela, suggesting potential provenance from the wider Galicia region and/or other parts of the Kingdom of Asturias. Such an interpretation is complemented by historical sources that suggest that the first portions of the Santiago urban population came from regional rural nuclei (López Alsina 2015). However, as was described above, historical sources also described the potential presence of individuals from across the Iberian Peninsula and even further: references about the presence of 'Franks' in Santiago de Compostela are from at least the first half of the 10th century AD (López Alsina 2015;Pallares Méndez and Portela Silva 1975). Comparison of our δ 18 O ap data (Mean ± SD = − 4.0 ± 1.0‰; range: − 6.5 to − 2.1‰) with the data obtained at the nearby Cathedral of Lugo (Mean ± SD = − 3.6 ± 1.1‰; range: − 5.6 to − 2.2‰) (López-Costas et al. 2021) shows that the values obtained in Santiago de Compostela are slightly lower, but also suggest the presence of individuals from outside the region. López-Costas et al. (2021) identified an individual (CP-704; δ 18 O ap = − 5.6‰) that seems to have spent some of his life in the centre of the Iberian Peninsula. Interestingly, this value is closer to those observed in three individuals identified here as potential non-locals (NCS002 = − 5.4‰; NCS025 = − 6.2‰ and NCS032 = − 6.5‰). Perhaps, these three potential non-local individuals were Christian coming from the wider kingdom of Al-Andalus. Although intriguing, geographical pinpointing is challenging if not impossible with 87 Sr/ 86 Sr analysis and interpretations should remain cautious in this regard.
Some of the tombs analysed contained the remains of more than one individual, something unexpected given known Church prohibitions on this practice (López Quiroga 2018). This practice was especially intensive for tomb type 'Sarcophagus', where 4 of 5 of those sarcophaguses had a minimum number of two individuals. On the basis of 87 Sr/ 86 Sr from those individuals, 6 of 8 corresponded to potential 'non-locals' (Table 1). Interestingly, 2 of those graves have a 'local' and a 'non-local' individual inside ( Table 1). The use of a tomb by more than one individual over time may occur because it was a family grave (members of the same family but from different generations), a burial condition based on marriage (where one individual was from outside Santiago de Compostela), or a grave occupied by non-related individuals that reused the tomb because of the lack of space (e.g. NCS001). Further DNA analysis is needed to test between these hypotheses. Amongst individuals in type 'Sarcophagus' tombs, some of them illustrate an early change of residence. NCS145a could be a possible 'non-local' individual as suggested by the 87 Sr/ 86 Sr values obtained from the first molar ( 87 Sr/ 86 Sr = 0.713797 ± 0.00 00014)-crown enamel development between birth and 2.5-3 years (AlQahtani et al. 2010), moving to Compostela at an early age on the basis of results from its second molar ( 87 Sr/ 86 Sr = 0.711426 ± 0.0000010)-crown enamel second molar development between 2.5 and 7.5 years (AlQahtani et al. 2010) (Table 1). Additionally, another two individuals, NCS039 and NCS258b, also showed 87 Sr/ 86 Sr variations between teeth, with 'non-local' values during the early years of life (NCS039: RP1/15 = 0.713102 ± 0.0000011crown enamel developed of the first premolar developing between 2.5 and 6.5 (AlQahtani et al. 2010), and RM2/17 = 0.712937 ± 0.0000013); NCS258b: RM2/47 = 0.713665 ± 0.0000013, and RM3/48 = 0.712886 ± 0.000009 (Table 1), crown enamel developed of the third molar developing between 8.5 and 12.5 years (AlQahtani et al. 2010). Further analysis may help to explore the patterns of mobility to the city as part of its growing rise to prominence between the 9th and 12th centuries AD.

Diet and social status at the centre of pilgrimage
Mediaeval historical records provide broad expectations in terms of variation in diet types and sources in Iberia as well as their relationship to social status and historical and geographical context. The diets of the social and economic elites throughout the Iberian Middle Ages were primarily characterised by the significant consumption of meat (Jiménez-Brobeil et al. 2016;Pérez-Ramallo et al. 2022;Pérez Samper 2019). Meat, together with dairy products, was available on a more limited basis for most of the rural populations (Pérez- Ramallo et al. 2022;Pérez Samper 2019;Grau-Sologestoa 2017). Peasants were historically distinguished by diets focus on local cereal crops, which vary by region as well as between rural and urban contexts (Peña-Chocarro et al. 2019;Rosener 1992). Following historical and archaeological sources, rye was the most cultivated cereal across Iberia, with wheat preferred as a 'luxury' crop by the social and economic elites (Andrade Cernadas 2009). By contrast, individuals of lower social status, in some parts of Iberia, could also resort to the C 4 crop millet, particularly in years of poor harvests or famine, which was usually reserved for animal fodder (Peña-Chocarro et al. 2019; Grumett and Muers 2010). The pattern of dietary changes in the incremental dentine δ 15 N and δ 13 C profiles for NCS006 and NCS007 (Fig. S2) may reflect such short-term changes. However, religious dietary restrictions affected all social status groups. Christianity forbade meat consumption during certain fasting dates, which could be as high as 150 days per year involving the consumption of alternative protein sources (marine or freshwater fish, legumes, nuts or vegetables), varying in quantity and quality between individuals The local fauna analysed from the Cathedral of Santiago and the Rocha Forte Castle demonstrated diets dominated by C 3 plant foods. Distinctions in δ 15 N were found between pure herbivores (Bos taurus and ovicaprines) and omnivores (Sus scrofa), as expected. Lower δ 15 N and higher δ 13 C were noted for fauna excavated from the Cathedral of Santiago when compared to Rocha Forte castle, perhaps explained by chronological or spatial divergences in environment, agricultural changes or distinctions in food provisioning between the occupants of the castle and the rest of the city as noted above (Hamilton and Thomas 2012). The faunal data provides a useful baseline for interpreting the human data from the Cathedral complex itself. Human δ 13 C and δ 15 N values suggest diets mainly based on C 3 foods, but with varying inputs of higher trophic level foods, C 4 plants (e.g. millet) and/or marine or freshwater proteins depending on the individual sampled. Where δ 13 C ap enamel and collagen δ 13 C and δ 15 N were available for the same individual, we can tentatively distinguish individuals with diets rich in C 4 plants (NCS007, NCS009, NCS016, NCS022 and NCS032) to those with significant marine protein inputs (NCS002, NCS003, NCS145b and NCS154) ( Table 1; Fig. 6, S4, and S5).
Significantly, variation in diet between individuals is correlated with tomb location. We found a higher apparent consumption of animal and/or aquatic protein in those individuals (NCS154, NCS256, NCS258a, NCS258b and NCS259) buried closer to the entrances of Alfonso III's Basilica (Zones '1' and '2' Mean and SD = δ 15 N 11.9 ± 0.4‰, and δ 13 C − 17.8 ± 0.9‰) (Fig. 3) that are expected to represent individuals of higher socio-economic status given the location of their graves and additional contextual information (López Alsina 2015, 1990Guerra Campos 1982;López Quiroga 2018). This fits with existing historical records that document that the diet of the social elite throughout the Middle Ages was primarily characterised by the significant consumption of meat and fish (Jiménez-Brobeil et al. 2016;Pérez-Ramallo et al. 2022). By contrast, individuals found in zone '0' (Mean and SD = δ 15 N 10.7 ± 0.7‰, and δ 13 C − 17.8 ± 0.9‰), the area with the largest number of burials and located at some distance from the entrances of the Basilica of Alfonso III, indicated a lower consumption of animal protein, a greater divergence in their values and increased presence of C 4 plant inputs to the diet (NCS007, NCS009, NCS016, NCS022 and NCS032) (Fig. 6, S4, and S5). Notably, as it was described above, C 4 crops, such as millet, were generally seen as 'fallback' foods for poorer communities during this period in Iberia (Andrade Cernadas 2009;Peña-Chocarro et al. 2019).
Comparison between teeth and ribs from the same individuals (n = 9) within zone '0' reveals that their diets may have changed over the course of their lives, with C 4 plants and/or marine proteins being replaced by a growing reliance on C 3 food resources, perhaps as a consequence of moving to Santiago de Compostela (Fig. S4). We must remain cautious as comparisons between different bone elements can be influenced by metabolic variations in routing (Fahy et al. 2017); however, clear observed changes can be seen in individuals NCS003, NCS007, NCS009, NCS010 and NCS032 (Fig. S4), and where available in the incremental dentine δ 15 N and δ 13 C profiles (Fig. S2). Individuals NCS007, NCS009 and NCS010 (from between the 10th and 11th centuries AD) show values that suggest a shift from C 4 to C 3 proteins. By contrast, individuals NCS003 and NCS032 illustrate values that indicate a substitution of marine proteins for terrestrial C 3 inputs. Both correspond to the last phase of occupation of the necropolis (11th-12th centuries AD). Interestingly, only two individuals were identified here as potential non-locals (NCS010 and NCS032) ( Table 1). The dietary variation in these two individuals may therefore be a result of geographic mobility. However, individuals NCS007, NCS009 and NCS003 may have responded more to socio-economic changes linked to the possibilities offered in this first mediaeval Galician city. In addition, short geographical mobility from nearby populations with similar geographical or climatic characteristics to those observed in Santiago de Compostela could also explain these variations observed in NCS007, NCS009 and NCS010. In case of NCS007, this individual might be also showing short-term famine and millet consumption (Tab. S1; Fig. S2). Nevertheless, we must remain cautious with this until further analyses are conducted because of the difficulties and limits to establishing an adequate isoscape and a local baseline.
Nearby urban centres geographically and/or temporarily such as Pontevedra (López-Costas and Müldner 2018) or Lisbon (Toso et al. 2019) reveal interesting differences that could be because of temporal or religious variations. The adult Muslim individuals analysed from the São Jorge Castle in Lisbon (Mean and SD = δ 15 N 9.9 ± 0.8‰, and δ 13 C − 18.9 ± 0.3‰), even though they could be members with a high social status, show values below those of Santiago de Compostela. However, the individuals from San Bartolomé in Pontevedra (Mean and SD = δ 15 N 11.7 ± 1.0‰, and δ 13 C − 16.9 ± 1.0‰) show higher nitrogen and carbon isotope values, possibly the product of a diet with strong contributions of marine protein given their easy access to the coast (López-Costas and Müldner 2018). Comparison with known high-status individuals such as the King Pedro I and his court (the analysed individuals lived in the north but were buried in Seville; 14th century AD) (Jiménez-Brobeil et al. 2016) or priests of high status at Capela do Pilar, Lugo (14th-15th centuries AD) (López-Costas et al. 2021;Kaal et al. 2016); San Salvador Cathedral, Oviedo (10th century AD) (MacKinnon et al. 2019), shows that the Santiago community as a whole did not reach these levels of access to high trophic foods, although in individuals from Zones '1' and '2', the differences are smaller (Figs. 6 and 8; Table 1 and S10). However, over environmental and geographical disparities, temporary differences must be considered as a crucial factor. The human values of zones 1 and 2 of the Cathedral of Santiago (Mean and SD = δ 15 N 11.9 ± 0.4‰, and δ 13 C − 17.8 ± 0.9‰) are close to those observed in the Cathedral of San Salvador de Oviedo (Mean and SD = δ 15 N 12.0 ± 1.2‰, and δ 13 C − 18.6 ± 0.2‰) (MacKinnon et al., 2019). However, we observed a disparity in δ 15 N when we compared our data with those obtained with the King Pedro I and his court (Mean and SD = δ 15 N 13.3 ± 1.5‰, and δ 13 C − 18.6 ± 0.5‰) (Jiménez-Brobeil et al. 2016), or the Cathedral of Santa María de Lugo (Mean and SD = δ 15 N 13.6 ± 1.3‰, and δ 13 C − 18.6 ± 0.5‰) (López-Costas et al. 2021). This seems ultimately a reflection of significant socio-economic differences because of the advancement and development of the peninsular Christian kingdoms during the Late Middle Ages (14th and 15th centuries AD). Overall, then, it seems that, by the 9th-12th centuries AD, living in Santiago may have brought certain increased access to meat and marine resources as part of its increasing centrality within a wider religious network. The similarities observed between the individuals in zones 1 and 2 of the Cathedral of Santiago, with those of the Cathedral of San Salvador de Oviedo, corroborate the interpretation that these zones were places reserved for individuals with certain religious, political and/or economic importance for the society of Santiago de Compostela between the 9th and 12th centuries AD.  Table S9)

Conclusions
Our research offers new insights into the beginning and development of Santiago de Compostela following the alleged discovery of the tomb of St James the Great in the 9th century AD and during the following three centuries. Radiocarbon dating has solidified the chronology of the necropolis and its tombs, showing a more complex use of space than was initially interpreted (Guerra Campos 1982). On the basis of measured 87 Sr/ 86 Sr data, above 50% of the individuals analysed illustrated values potentially indicative of 'non-local' childhoods, particularly for individuals associated with the oldest tomb types (type 'Sarcophagus' and 'Cists'). The combination of strontium and oxygen isotopic data reveals that these 'non-locals' were primarily from a region with environmental conditions similar to those of Santiago of Compostela. Comparison of our data with historical sources suggests that early Santiago may have been populated by individuals from the surrounding rural settlements, the bishop's headquarters of Iria-Flavia (e.g. the bishop Theodomir) and perhaps the wider the Kingdom of Asturias. Wider mobility documented from three individuals may also indicate the possibility of individuals arriving from Al-Andalus-especially priests and bishops who were documented as fleeing Muslim rule during the 9th and 10th centuries AD. Further analysis is required to refine our understanding of scales of mobility within the vicinity of Santiago de Compostela in the future.
The δ 15 N and δ 13 C results, and the archaeological context, reveal a population with internal socioeconomic divisions that prove the existence of hierarchical society which may have had greater access to certain resources relative to other centres in the same region thanks to its growing religious, political and social status. Our work provides direct information about the origin and development of what was to become one of the biggest mediaeval pilgrimage centres in Europe, allowing us to contrast historical sources with direct insights into diet and mobility from the archaeological remains themselves. Although our human sample size is limited as a result of the destruction of many tombs during previous archaeological excavations, meaning caution should be taken when extrapolating our findings, we believe that our methodological approach holds much promise for future investigations of the emergence of Santiago de Compostela as a European mediaeval religious centre and its impacts on the diets, mobility and cultural behaviours of its inhabitants as part of networks that pilgrims still tread into the 21st century.