Castillo de Matrera perches at 523 meters on Monte Pajarete in Villamartín, Cádiz province, commanding the frontier of the Cora of Ronda. Constructed in the 9th century by Omar ibn Hafsún, this Moorish fortress defended a crucial frontier post until its surrender to the Catholic Monarchs in 1489. Declared a national monument in 1949 and a Cultural Heritage site in 1985, the castle experienced severe structural collapse in 2013 but has since undergone sensitive restoration employing lime plaster and traditional techniques to preserve its medieval character while stabilizing this important historical landmark.