The Cartama Castle is located in the Monte de la Virgen (Mount of the Virgin), where the Hermitage of Nuestra Señora de los Remedios is also located and where it is possible to be enjoyed some impressive panoramic views. Cártama Castle was built by the Moors in the early Middle Ages. During the Mozarabic revolt of Omar ibn Hafsun, between 881 and 914 AD, Cártama stayed loyal to the Caliphate of Córdoba and the castle was strengthened.
Because of the advancing Christian troops Cártama Castle was again strengthened during the 14th century. By that time the castle would probably have had a double curtain wall and several towers. In 1485 however, the castle was taken by Christians troops. Because the castle was important for their siege against the city of Málaga the Catholic Monarchs invested large sums of money in maintaining the castle between 1485 and 1487. From 1491 on the castle lost its strategic importance and the castle was used as a quarry by the locals.
What you can see today are the scarce remains of a rectangular alcazaba with its surrounding walls and a cistern.
References:The Walls of Constantinople are a series of defensive stone walls that have surrounded and protected the city of Constantinople (today Istanbul) since its founding as the new capital of the Roman Empire by Constantine the Great. With numerous additions and modifications during their history, they were the last great fortification system of antiquity, and one of the most complex and elaborate systems ever built. They were also the largest and strongest fortification in both the ancient and medieval world.
Initially built by Constantine the Great, the walls surrounded the new city on all sides, protecting it against attack from both sea and land. As the city grew, the famous double line of the Theodosian Walls was built in the 5th century. Although the other sections of the walls were less elaborate, they were, when well-manned, almost impregnable for any medieval besieger.