The Castle of Loarre is a Romanesque Castle and Abbey located near the town of the same name, Huesca Province in the Aragon autonomous region of Spain. It is one of the oldest castles in Spain. History The castle was built largely during the 11th and 13th centuries, when its position on the frontier between Christian and Muslim lands gave it strategic importance. The first of the two major building programs began circa 1020, when Sancho el Mayor (r. 1063–94) reconquered the surrounding lands from the Muslims. After 1070, Loarre became increasingly important. In 1073, King Sancho Ramírez installed a community of Augustinian canons, and it was from Loarre that he prepared for the conquest of Huesca in 1094. In 1097, however, his successor, Peter I of Aragon and Navarre, donated all the goods of Loarre to a new royal monastery at Montearagon. This evidence suggests that the second major construction program was undertaken between 1073 and 1097, and much building evidently does date from this period. By comparison with other monuments, however, it is also clear that the building and decorative program continued into the 12th century. The location appears in the 2005 epic film Kingdom of Heaven. Architecture The castle's location on a rocky outcrop affected the layout; it was not possible to have one unified structure, and like many castles, Loarre was a collection of buildings bounded by curtain walls. Originally the internal plan included two towers and a chapel behind several curtain walls. Towards the end of the 11th century, an additional chapel was built in Romanesque style just outside the castle walls. The outermost walls of the castle and their eight towers were erected in the 13th or 14th century. The church and castle have been the subject of numerous restorations, a major one in 1913 and subsequent ones, particularly during the 1970s, have resulted in the rebuilding of many walls and towers that had fallen into disrepair. At least three towers, two of which survive, the keep (Torre del Homenaje) and the "Tower of the Queen" (Torre de la Reina), as well as a chapel dedicated to Saint Mary of Valverde and connecting walls are attributed to this campaign. The keep was built in an isolated position in front of the fortifications, to which it was connected by a wooden bridge. It contained a basement and five floors. The Torre de la Reina, comprising