In 955, Almería gained the title of medina ('city') by the Caliph of Cordoba, Abd ar-Rahman III: construction of the defensive citadel, located in the upper sector of the city, began in this period. The alcazaba, provided not only with walls and towers but also with squares, houses and a mosque, was to be also the seat of the local government, commanding the city and the sea nearby.
The complex was enlarged under caliph Al-Mansur and, later, under Al-Jairan, first king of the independent taifa of Almería (1012–1028).
The first line of walls is a wide enclosure corresponding to the first Muslim military camp, used as shelter for the population in case of siege. For this task it was provided with large cisterns.
The first enclosure is separated by the second one by the so-called Muro de la Vela ('Wall of the Sail'), taking its name from a bell that warned the population in case of events such as the arrival of a ship in the port, danger, fires etc. This wall was built by King Charles III of Spain.
In the second enclosure was the residence for the governors, their soldiers and their servants. It included also the mosque, baths, tanks, tents etc.
The third enclosure, the most external, is also the most modern in the complex. After the Christian conquest of Almería, the Catholic monarchs Isabella I of Castile and Ferdinand II of Aragon had a castle built in the most elevated sector of the town, more apt to resist the new gunpowder artillery.
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.