Castillo de Carcabuey, also known as Castillo de Fuente Úbeda, stands as a medieval fortress in the municipality of Carcabuey in Córdoba province, strategically positioned at the convergence of five Andalusian provinces' communications routes. First documented in the 9th century on a Roman site, the castle was destroyed in 892 by emir Abd Allah before being rebuilt after Ferdinand III's conquest. From the mid-thirteenth century it belonged to the Order of Calatrava until 1333 when Muhammad IV of Granada conquered it. The fortress features five towers—two square and three circular—with a well-preserved keep within the walled enclosure. An eighteenth-century chapel, Ermita de Nuestra Señora del Castillo, occupies the upper courtyard.