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 Clementinum is a historic complex of buildings in Prague. Until recently the complex hosted the National, University and Technical libraries, the City Library also being located nearby on Mariánské Náměstí. The Technical library and the Municipal library have moved to the Prague National Technical Library at Technická 6 since 2009. It is currently in use as the National Library of the Czech Republic.
Its history dates from the existence of a chapel dedicated to Saint Clement in the 11th century. A Dominican monastery was founded in the medieval period, which was transformed in 1556 to a Jesuit college. In 1622 the Jesuits transferred the library of Charles University to the Klementinum, and the college was merged with the University in 1654. The Jesuits remained until 1773, when the Klementinum was established as an observatory, library, and university by the Empress Maria Theresa of Austria.