Castle of Salir The Castle of Salir ( ) is an Almohad fortress , located in the civil parish of the same name ( Salir ( Loulé ) ) , 16 kilometres from the municipality seat of Loulé in the Portuguese Algarve . History . The castle is a late Islamic castle , built during a period of intense pressure from Christian forces . It was part of the a network of Almohad castles , an extensive line of coastal defenses that stretched into the interior from Castro Marim until Alcoutim . Salir was a rural defensive post , one of several that were aligned towards the interior : it was an advanced outpost . Its function was to protect the farmers from attacks by Christians , and which intensified after the conquest of Tavira by knights of the Order of Santiago . The construction of the castle occurred in the 12th century , but was King Sancho I of Portugal conquered the settlement in 1189 . Ever mindful of Moorish counteroffensives , the walls were reinforced at the end of the 12th century . The majority of ceramics discovered on the site date to the period between the 12th and 13th century . Salir enters the compiled documents of the Portugaliae Monumenta Historica , as the name of a place taken by commander Paio Peres Correia . The master was to await the arrival of Afonso ( 1248 – 1279 ) so that they could unite their forces and remove the last vestiges of resistance in the Algarve . Consequently , the fortification of Salir , within this context , had a strategic role . Later , a fire destroyed the castle , which was reconstructed two times , before actually falling into ruins . Around 1505 , there were less than 87 residential homes in Salir . By the end of the 16th century , the castle was already abandoned and in a state of ruins . In 1758 , there were 11 homes in Salir , likely due to the 1755 Lisbon earthquake which caused damage to the castle and surrounding countryside . The civil parish of São Sebastião de Salir had approximately 408 homes in 1798 . The slow deterioration of the castle was , by 1841 , semi - complete , as reports from the site suggest that the structure was in ruins . The first archaeological investigation of the castle and surroundings began in 1987 . Salir was elevated to the status of town in 1993 . Legend . Salir received its name , from the " disappearance " of the daughter of the Moorish alcalde Aben - Fabilla , so a legend suggests , who escaped when he saw his castle being threatened by the army of Afonso III . But , before fleeing , the alcalde buried all his gold , thinking that he could retrieve it later . When the Christians took the castle , they discovered it was empty , except for the beautiful daughter of the alcade who prayed with fervor , and who had preferred to stay in the castle and die a " salir " . From a nearby mountain , Aben - Fabilia saw his captive daughter in the hands of the Christians and with his right hand made a sign of the Star of David , uttering some mysterious words . At that moment , while the knight Gonçalo Peres was talking to the girl , she was transformed into a statue of rock . The news of the enchanted Moor permeated the castle . But , one day the statue disappeared . The memory of the strange event became linked to Salir , whose towns folk named the village in honour of the courageous youth . The legend concludes with the reflection that , on certain nights , the enchanted statue appears in the Castle . Architecture . The castle is located in a rural , semi - mountainous isolated location , implanted in an elevated point in the Algarvean Barrocal , located north - northwest from the parish seat of Salir . It is situated in an area of ample visibility over the fertile valleys to the north and west . The elevated hilltop is 250 metres above sea level , relatively close to the highest points of the Serra do Caldeirão . Located to the east is the Roman archaeological site of Torrinha . The castle is laid - out in a central , but irregular , plan in the form of oval . The articulated spaces are aligned horizontally , but with no roofing ( except for the traditional home at its centre and interpretative center ) . The main facade is oriented towards the south , where the slope is less accentuated . A main doorway is not identifiable , although there are indications that it was situated on the extreme southeast , corresponding to the principal access - way to the castle . There are five definable walls , defined by the main fate and four separate towers , all rectangular and some state of ruin . Tower " D " , also known as the " Muro do Meio " ( " Middle Wall " ) is in the northeast , in an area of accentuated slope , marked by a robust berm . The wall is little more than wide , that was almost completely destroyed in course of accessing the spaces ; what remains is just a section . Tower " C " , known as the " Torre da Alfarrobeira " ( " Tower of the Carob Tree " ) is located in the northern flank of the castle , precisely at the point where the slope in relation to the valley is more accentuated . A three metre ( ) high section of this wall still remains , in size . Tower " B " , referred to as the " Muro Maior " ( " Major Wall " ) is along the northeastern flank , farthest from the main road , and a section that is similar to the rest , with the addition of buildings abutting along the east and south . The south tower is integrated into these constructions , and abutting the southeastern wall . There are also two sections , wide , that are conserved to about : in the north , that connect Tower " D " and Tower " B " , passing through " C " ; and a small section in the southeast , known as the " Muro da Sabedoria " ( " Wall of Wisdom " ) . This is all that is left of the circuit that encirles the castle and connected to the interior of the grounds . The excavated area , east of Tower " B " consists of an irregular rectangular area where the discovery of a few constructions were first identified : specifically , they included a kitchen and living spaces dating to the period of the Moorish occupation of the castle . The paths are gardened / landscaped with Portuguese pavement stone , limited the corners and towers , while bunks were deposited in the garden around Tower " B " . It is difficult to determine the state of the original interiors , articulation of the spaces , illumination or ceilings , due to the state of decay . The principal artery is defined by the " Travessa do Castelo " , which parts from the main entrance southeast and terminates in the west , dividing the courtyard of the castle in half . Interpretative Center . Located in the excavated area of the castle , east of Tower " B " , it is a rectangular building , with a simple single floor . The principal facade is oriented to the south , towards the public access - way , accessible by a double flight of stairs .