Gérgal Castle was built somewhere during the Late Middle Ages during Muslim rule. By 1492 it had fallen into the hands of the Catholic Monarchs; Queen Isabella I of Castile and King Ferdinand II of Aragon. They donated the castle to Alonso de Cárdenas, Grand Master of the Order of Santiago, for outstanding services during the Granada War.
During the 16th century it played an important defensive role against the inland raids of Barbary pirates, who were supported by the remaining Moorish population. In 1568 the Moors rebelled and the Christians in Gérgal were massacred and the Moors held the castle. They were driven out some time later and the castle was destroyed by Christian forces to avoid a repeated use by the Moors. Between 1571 and 1620 all the Moors were expelled from the Iberian mainland. This left the area around Gérgal Castle depopulated and open to banditry.
During the first half of the 17th century Gérgal Castle was rebuilt on the site of the old Muslim fortification to restore order and favor repopulation in the area. In the middle of the 18th century it belonged to Isabel Pacheco Portocarrero, Countesss of Puebla del Maestre and Marchioness of Torre de las Sirgadas. She used it for storing storing grains.
The castle we see today dates back to the rebuilding in the 17th century. Its core is a square crenellated tower with lower round towers at its corners. At its north western facade and attached to one of the corner towers is a semicircular bastion. It is build up out of horizontally laid slabs of slate. The castle is now also equipped with a crenellated outer wall, but this was built by the present owner.
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.