Castillo de Arenas rises on Cerro del Castillo de Puerta Arenas in the Sierra Mágina region, located five kilometers from Campillo de Arenas in Jaén province. This fortress of Islamic origin, built around the 14th century with earlier 9th-to-11th-century structures, guarded the natural frontier between the Kingdoms of Castile and Granada at the Puerta de Arenas pass. Originally fortifying the frontier established by the Treaty of Jaén in 1246, the castle was captured by Alfonso X, recovered by the Arabs in 1280, and finally conquered by the Catholic Monarchs in 1486. Standing halfway between Granada and Jaén, the ruins now remain under Spanish Historical Heritage protection, testament to its crucial medieval role defending mountain passages.