The medieval castle of Carcabuey was the object of incursions by Ibn Hafsun at the end of the Emirate, being dominated and demolished by the emir Add-Allah in 892. Conquered by Fernando III, it was rebuilt according to the design of other fortifications, such as those in Fuengirola or Iznájar.
From the mid-13th century, it belonged to the Order of Calatrava, until, in 1333, it was conquered by Muhammad IV of Granada and reconquered and modified shortly after by Alfonso XI. It was integrated into the Señorío de Aguilar after numerous donations.
The fortress has five towers distributed along the wall, of which two are square and three circular. Inside the walled enclosure, the keep remains well-preserved. In the upper part of the courtyard sits the eighteenth-century chapel, Ermita de Nuestra Señora del Castillo.
The castle itself has gone down in history for the battle between King Alfonso X and his rival, Sancho. According to legend, the King had ordered everyone not to leave the castle under any circumstances. His rival knew that, in order to emerge victorious over the local population, he needed to flush the army out onto open ground. He learned that the Governor's daughter had a 'secret' lover and therefore devised a plan to lure her away from the castle to meet her true love and escape together. He was sure that the Governor would call out the troops to go after the girl and return her. The Governor, Pero Nuño Tello, was committed to total loyalty to his King and refused to send out the troops, thus losing his daughter forever as she fled with her lover. Interestingly, when Sancho later became King, he was sorry for the injury he had caused to the Governor and called Pero to his court to make amends. However, he was only able to meet with Pero's dead body as the Governor committed suicide, feeling that his dead body was the only loyal part of himself that he could present to the new king. His spirit, as the legend goes, would never bow to Sancho.
References:The Church of St Donatus name refers to Donatus of Zadar, who began construction on this church in the 9th century and ended it on the northeastern part of the Roman forum. It is the largest Pre-Romanesque building in Croatia.
The beginning of the building of the church was placed to the second half of the 8th century, and it is supposed to have been completed in the 9th century. The Zadar bishop and diplomat Donat (8th and 9th centuries) is credited with the building of the church. He led the representations of the Dalmatian cities to Constantinople and Charles the Great, which is why this church bears slight resemblance to Charlemagne's court chapels, especially the one in Aachen, and also to the Basilica of San Vitale in Ravenna. It belongs to the Pre-Romanesque architectural period.
The circular church, formerly domed, is 27 m high and is characterised by simplicity and technical primitivism.