Geophysical survey at the frontier of medieval Iberia: The castles of Molina de Aragón and Atienza (Guadalajara, Spain)

This paper presents the results of geophysical surveys conducted within two castles in central Iberia: the fortifications of Molina de Aragón and Atienza, both located within the modern province of Guadalajara in Spain. They represent essential case studies for understanding the transformations of the frontier societies of medieval south‐western Europe, because both were founded during the Andalusi period, both played a fundamental role at the time of the military confrontations between opposing Islamic and Christian states, and both became capitals within the feudal dependencies of the Crown of Castile during the Late Middle Ages. At present, these castles are uninhabited and protected archaeological sites, with no modern developments within their wards; the adjacent towns have developed on the outskirts of their outer walls. Although both castles have been the focus of uneven amounts of archaeological research, geophysical surveys, the first conducted at these sites, have proved to be a fundamental tool not only for planning future archaeological investigations but also for the data that they have provided on the potential roles of these castle wards.

The substantial number of fortified structures in Iberia is commonly interpreted as the result of the political instability of this period, with successive waves of conquests and migration, as well as the creation of new frontiers and internal borderlands not only between Muslim and Christian states but also between neighbouring territories of broadly culturally aligned lordships, crowns and (in the case of al-Andalus) Taifa kingdoms. According to the Spanish association concerned with the preservation of castles (Asociaci on española de amigos de los Castillos), 1 there are more than 10 000 fortifications across the country, of which at least 3000 could be considered to date to the medieval period. Although there is no official inventory, it is possible to estimate on the basis of existing scholarship that around 500 castles have been excavated and published, which accounts for less than approximately 2% of the total (Bazzana et al., 1983;Ferreira Fernándes, 2002, 2013Gallego, 2016;Gutiérrez González & Suárez Manj on, 2007;Malpica Cuello, 1998Martín García et al., 1999;Molina & Eiroa, 2009;Palacios Ontalva, 2019; Quir os Castillo & Tejado Sebastián, 2012; Retuerce Velasco & de Castro Fernández, 2018;Retuerce Velasco & Cobos Guerra, 2004;Valor Piechota & Gutiérrez González, 2014, pp. 148-175).
Within the category of medieval castles, there is a distinctive group that served for a period of time as centres of governance for frontier territories. Their occupation phases are typically aligned with the history of regime change, with earlier Islamic fortifications often replaced by more substantial Christian structures. Following military conquests and territorial annexations, existing fortified centres were granted to representatives of the new regime, whether private individuals who were members of the nobility or institutions such as military orders, along with associated lands. These lordships were connected to the Castilian, Aragonese and Portuguese crowns through a hierarchical power structure that is widely referred to as 'feudal' in the scholarly literature. However, as with marcher lordships elsewhere in medieval Europe, frontier authorities in Iberia could exercise a substantial amount of private power, expressed in judicial, fiscal, military and symbolic terms. Changes in the ownership of castles following the imposition of a new regime were typically accompanied by a phase of castle expansion and the reassignment of the use of internal spaces, although this was not always immediate and could represent investment from several generations of owners. This, in turn, reflected the changing character and size of the castle's community, as well as the purchasing power of its owners. Integrated analyses of the castle's standing fabric and buried archaeology are essential for understanding the diachronic development of these complex structures, as well as the changing functions of their spaces, encompassing a variety of residential, military, religious, artisanal and agricultural roles.
However, soils and sediments have been investigated only infrequently during castle excavations using geoarchaeological methods, except to assess the geological and geomorphological aspects of castle locations in relation to the strategic, military roles . The spatially diverse character of occupation within the castle site can be partially reconstructed from these structural analyses, alongside archaeological analyses of food, manufacturing and other consumption waste, as well as physical and chemical geoarchaeological signatures of specific activities such as artisan activities, stabling and the storage of agricultural produce . Soil geochemistry is well established in archaeology as a method for understanding the use of settlements (Banerjea et al., 2017); land use, which has included areas around fortifications (Brown et al., 2015); and as a prospection tool (García Porras, 2021).
To be applied effectively, it requires robust sampling protocols that target key soil horizons and record them and clear archaeological questions developed between geochemist and archaeologist and to examine to what extent is the geochemical methodology complementary to conventional surveying techniques (Oonk et al., 2009). Regrettably, none of these principles were applied in a recent geochemical study at Molina de Arag on (Exp osito-Suárez et al., 2023), which has negatively impacted the value of these data for archaeological prospection. For example, the study analyses samples collected from Prao de los Judios, which had already been subjected to archaeological excavations and backfilled with sand during the conservation works.
The use of geophysical survey, combined with other types of remote sensing, such as Lidar, is an essential first stage in mapping the internal use of space within a castle site and guiding the placement of excavations to recover data on the diachronic use of space, the character of the castle's changing community and the connections between the site and its historical territory.  (Figure 1). The range of techniques used in these surveys has varied depending on the type of site and nature of the soils and has included magnetic methods, ground-penetrating radar (GPR) and electrical resistivity tomography (ERT).
This paper presents the results of geophysical surveys at two castles in the province of Guadalajara-Molina de Arag on and Atienzawithin the framework of the 'Landscapes of (Re)conquest' project (LoR) (Figure 2). 2 This project investigates the character of medieval frontiers in south-western Europe from a socio-environmental perspective, focusing on the relationship between castles and their associated territories within the context of the creation and dissolution of frontiers (García-Contreras Ruiz, 2018. The main pilot for LoR was developed at Molina de Arag on (García-Contreras Ruiz et al., 2016), whose historical territory is partly encompassed by the Molina-Alto Tajo UNESCO Geopark, dominating the eastern part of Guadalajara province. Both castles are defined by a principal fortified residence connected with one or more substantial enclosed wards, as well as outer fortified elements. Both are also associated with the F I G U R E 1 Medieval sites in Spain for which geophysical surveys have been published.
F I G U R E 2 The castles of Molina de Arag on and Atienza within the province of Guadalajara, Spain (data from Diputaci on de Guadalajara). creation of adjacent towns following the Christian conquests, which contained Christian, Jewish and Muslim (or Mudejar) communities, as well as a fluctuating pattern of rural settlement within their territories.
The results of the geophysical surveys demonstrated that the interiors of these castles were complex spaces, reflecting the long-term biographies of these sites from the time of their initial construction through to the present day.

| GUADALAJARA PROVINCE
The territories within the modern province of Guadalajara, located in the centre of the Iberian Peninsula, date back to the medieval period.
They were created following the southwards expansion of the kingdom of Castile at the expense of al-Andalus (see below). This resulted in the establishment of a series of frontier lordships, which were endowed with a principal city and a dependent territory with rural settlements. From the 16th century, the most politically and demographically significant cities were designated as capitals of several agglomerated territories. One of these became the province of Guadalajara, whose boundaries have remained essentially the same since at least 1590, but its current physiognomy dates to the administrative reforms of the 19th century (Ballesteros et al., 2001;Martínez Díez, 1981).
This region formed the borderland between Muslim and Christian societies for several centuries. Firstly, this region was under the control of Al-Andalus from the 8th to 11th century, known as Marca Media or the 'central border' (Manzano Moreno, 1991). The Castilian crown annexed this region between the 11th and 12th centuries and created a new frontier territory called Extremadura Castellana. This was sub-divided into the domains of local authorities in charge of the Comunidades de Villa y Tierra, referring to towns and their territories in both economic and political terms (Estepa Díez, 2006;Martínez Díez, 1983). These 'town and land' communities, which were a typical form of lordship in the borderlands of the kingdom of Castile, would eventually constitute the territorial bases for the divisions of the modern Spanish state. This initial process of territorial division following the Castilian conquest has been studied in relation to the construction of castles, the formation of towns and civic councils, estate management, the introduction of Christianity and the imposition of regulations and taxation. The countryside, on the other hand, remains poorly understood, but clearly fundamental changes took place following the Christian conquest that points to significant investment. The historical importance of these two castles is clearly defined in the written sources. Molina de Arag on was the capital of an almost independent territory during the Taifa period (11th century) but above all after the Castilian conquest when the aristocratic Lara family took control of the centre. This united political and economic power, as the town functions as the regional market and lies at the crossroads of long-distance cattle routes. Its location on the border between Castile and Aragon also gave it an important strategic role. Atienza was the principal base for Caliphal troops in the defence of the Andalusi border against Christian attacks from the north. After the Castilian conquest, it was transformed into a lordship or Comunidad de Villa y Tierra directly dependent on the crown, rather than on any noble family or ecclesiastical elite. Its urban council and the governors of its castle played important roles in the internal politics of Castile, and it served as the temporary seat of some monarchs and a focus of conflict during civil wars.
The location of these two castles can be explained in relation to their geological context. The province of Guadalajara has both uneven topography and considerable relief (600-2500 m.a.s.l.) consisting of plutonic, metamorphic and sedimentary rocks; areas with complex Hercynian structures with Alpine structures and non-folded Cenozoic regions, diverse climatic erosive patterns and areas covered with thick superficial deposits alternating with areas lacking those deposits where broad outcrops of underlying rock define the landscape (Calonge & Rodríguez, 2008;García-Quintana et al., 2005). In addition, a series of buildings were constructed up against the walls, but their function remains unclear. At the Torre de Arag on, the Islamic earthen walls were rebuilt in stone, and a cistern was constructed as well as a large pentagonal tower whose appearance has remained unchanged into the present day. 5. Restoration works during the 1960s led by the Fine Arts Directorate that dismantled structures from the second phase and utilized grey cement mortar for rebuilding, in what has been described as 'the most aggressive action that the monument has suffered throughout its history' (Arenas Esteban, 2008, p. 26).
The albacar, which was the focus of the geophysical survey presented in this paper, saw only small-scale excavations in 1995 focused on the ruins of the church of Santa Catalina, also called 'Cristo de las Murallas'. Located by the Puerta del Reloj entrance to the fortified ward, its remains had been uncovered before the excavations took place (Arenas Esteban, 2008, p. 32). The church was built in the 12th century, as suggested by its plan and architectural style, but it is first mentioned in written sources in the 13th century. It was destroyed by Napoleonic troops during the War of Independence (Abanades, 1963, p. 44). Between the 12th and 19th centuries, various phases of occupation and re-occupation were identified, with a clear phase of rebuilding in the late medieval/early modern period, which was also  Prieto, 1988, pp. 635-638), with dates spanning from the 7th to 15th centuries Retuerce Velasco, 1998).
Regarding its construction, which can be dated to the 12th century, most of the castle has regular masonry courses with ashlars reinforcing the corners and openings. In the northwest corner, the remains of a tower with masonry in a 'herringbone' arrangement are similar to others in the vicinity identified as Andalusi constructions (Daza Pardo, 2007). It has been proposed as the oldest phase of the castle and the only clear architectural evidence from the Andalusi period, although one of the cisterns may also date from this period (Valiente Malla & Cuadrado Prieto, 1988, pp. 633-635). However, it is not clear exactly where the Andalusi settlement was located. Within the bounds of the fortified complex, in the absence of any published stratigraphic archaeological excavations, which were not carried out even during the restoration of part of the castle wall (Muñoz Jiménez, 2008), only the results of fieldwalking surveys are available, which of course must be treated with caution.
Layna Serrano and Basilio Pav on suggested that the current church of Santa María del Rey may have been converted from a mosque (Layna Serrano, 2004, pp. 50-51;Pav on Maldonado, 1984, p. 64).
This church is located on the western slope, today otherwise empty and not built on. It is precisely in the western part of the wall that the only Andalusi architectural vestige has been recognized and to the F I G U R E 4 Plan of the fortified complex in Atienza, showing the alcazaba, albacar, church and associated enclosed district (Instituto Geográfico Nacional https://centrodedescargas.cnig.es/). northwest is Cerro Padrastro, where the largest quantity of ceramics has been documented through fieldwalking surveys. In this respect, the Andalusi settlement must have been located between the two hills, that of the castle and the Cerro Padrastro, relocating to the eastern slope after the Castilian conquest, when the different parts of the wall were constructed. The original fortification must have been situated on Cerro Padrastro, and from the 10th century, the rocky platform on which the castle is located today began to be developed and remained fortified until the modern period. It is quite likely that the Andalusi population was clustered around the fortification, which would explain the lower density of Andalusi settlements in the surroundings of Atienza, in contrast to other parts of the province of Guadalajara (García-Contreras Ruiz, 2016aRuiz, , 2016b. After the Castilian conquest, the site continued to be occupied and was heavily transformed, although no study has considered this in detail. It is probable that the Tower of Homage dates from this period, although more than one phase is suggested by its structure, and it is likely that a keep was added. The written sources for the castle in Atienza refer to various buildings that served its inhabitants, but aside from the two cisterns, the keep and the walls that surround the complex, we know nothing about these internal constructions or subdivisions of space within the castle. It is entirely possible that some of areas functioned solely to house mustering troops or to protect the population and their goods, so for much of the time they would have remained empty.

| GEOPHYSICAL METHODOLOGY
Two separate geophysical surveys were conducted within the fortifications of Atienza and Molina de Arag on between 4 and 9 July 2016.
The surveys detected many features and structures relating to the occupation of the castles. Because of the challenging steep and undulating terrain, vegetation cover and the time limitations for coverage, a magnetic survey was chosen as the most practical method for data coverage and quality. Both sites were surveyed using a Bartington 601-2 fluxgate gradiometer, at a resolution of 0.5 m (traverse intervals) * 0.25 m (sample interval). A cart system was considered for the surveys; however, because of the nature of the survey areas, being constrained in size and on challenging terrain, a walked survey was deemed the most appropriate methodology ( Figure 5). The survey was conducted using 20-m grids, positioned using a Leica Total Station (TC407). The surveys were successful in delimiting particular areas of activity and structural remains at both sites; however, some features of archaeological interest, particularly structures such as walls or buildings, built from the parent geology have been difficult to identify and may still be undetected as a result of the low magnetic contrast at both sites. Anomalies within the magnetic surveys that are indicative of ferrous material, modern debris or geological origin have not been discussed within this publication as they are not considered relevant to the archaeological analysis of the sites. These are discussed briefly in the associated survey report, completed shortly after both surveys (Fry et al., 2016).

| GEOPHYSICAL SURVEY: MOLINA DE ARAGÓN
The surveyed area at the castle of Molina de Arag on focused on the steep hillside containing the enclosed outer ward or albacar, which slopes southwards towards the modern town. Within this area, 1.7 ha of land was suitable for survey; areas not suitable included parts that had been fenced off for safety reasons or which were not possible to walk over, such as the location of three extant bomb craters dating from the Spanish Civil wars. An area of 0.2 ha was also surveyed within the inner ward of the alcazaba; however, this was largely affected by magnetic noise from external sources such as electricity cables, mounds of sorted brick, metal fences and a recently constructed scaffold viewing platform. The extant structural remains within the surveyed area confirmed a mixture of buildings constructed from local stone and fired bricks. Despite the weak magnetic contrast, the survey was able to successfully identify anomalies of potential archaeological interest, especially on the steepest slope of the outer ward ( Figure 6). This is of interest because most of the castles in the region, not only in the province of Guadalajara but throughout the centre of the Iberian Peninsula, tend to have completely empty-walled enclosures today. Their function at the time of their construction remains largely unknown, but they may have accommodated residential and storage structures and/or served as a place of refuge for local communities and livestock.  Taifa period, that is, the 11th century. There is no evidence of any material culture or constructions within the fortified complex that can be dated to earlier than the tenth century. The changes that took place in all the subsequent occupation phases do not appear to have substantially changed the appearance of the 12th-century castle. The location of these anomalies in the centre of the albacar, an area that has previously not been excavated, points to the likelihood of a different enclosed plan than suggested by the current layout of the castle. This is reinforced by the evidence from other castles in the province, for example, Zorita de los Canes or Embid, where the transformation of the fortifications in the 12th century following the Christian conquests retained the essential plans and forms of the 11th-century F I G U R E 7 Fluxgate gradiometer survey of Atienza showing the different survey areas. (a) Processed magnetic data at +7nT (black) to À7nT (white), (b) magnetic interpretation and (c) data positioned onto three-dimensional landscape showing possible structures identified within the data as extruded features. Aerial photography and LiDAR: National Geographic Information Center of Spain (CNIG)-CC-BY 4.0. Extant buildings layer: (C)OpenStreetMap, OpenStreetMap Licence, using: EDINA Global Digimap Service. structures, with no evidence of earlier phases (de Ayala Martínez, 1993;Martínez G omez et al., n.d.;Perla, 2011;Urbina & Urquijo, 2022). The settlements associated with the previous emirate and caliphal periods are usually located in different sites. The same sequence of construction can be seen in the so-called Tower of Aragon, which is located on top of the hill above the fortified complex at Molina. The archaeological excavations carried out in the centre of the albacar in 2020 and 2021 revealed the presence of a domestic structure dating from the 12th century that was used as a rubbish dump in the 13th century, after which the sloping surface was heavily eroded. Here, there were no traces of the internal subdivisions from the Andalusi period, although detailed analyses of the finds and stratigraphy are still ongoing. It is possible that a larger excavation area would need to be opened to capture these features. coverage and terrain are more favorable, that additional surveys with GPR targeting the subtle magnetic anomalies that potentially relate to structural remains would be beneficial. Nonetheless, these surveys will continue to inform future excavations that will enable the diachronic development of these complexes to be clarified, particularly following their repurposing after the Christian conquests.