Subbetica
DEFENSIVE WALLS
In 886, following the death of Emir Mohamed of Córdoba, Cabra rose up in support of Omar, son of Hafsum, but Almóndir, his successor, sent cavalry who captured the castle and fortress. In 1226, Alfonso the Battler conquered it, but having been defeated at Castillo Anzur, he abandoned it. In 1240, it was conquered by Ferdinand III, who granted it to Alonso Rodríguez de León. On 5 February 1258, Alfonso X signed a charter granting Cabra to the Council of Córdoba. In 1288, Sancho the Brave revoked this grant, giving it to his son Pedro de Ledesma, who exchanged the town of Santa Olaya with the Order of Calatrava for the commandery of Cabra, whose first holder was Juan Núñez del Prado. In 1328, Alfonso XI ordered the castle and fortifications to be rebuilt. According to Ramírez de Arellano, the outer towers may date from this period. In 1331, the friar Pedro Díaz de Aguayo handed it over to the people of Granada, who demolished most of its towers and walls. In 1445, Henry IV granted the fortress and castle, along with the title of count, to Marshal Diego Fernández de Córdoba.