A few kilometres from El Chorro and the Caminito del Rey, you can visit Bobastro castle and Omar ben Hafsun. (Follow the MA-448 until the junction signposted for Bobastro and the Mesas de Villaverde.) lay the ruins of the impressive fortress known as “Bobastro” that are well worth a visit if only for its stunning setting. (You really need a car to visit this place though.)
This area around 850 to 917 was ruled by Umar ibn Hafsun ibn Ja’far ibn Salim (Arabic: عمر بن حَفْصُون بن جعفر بن سالم). In Spanish this man was known as Omar Ben Hafsun and in the 9th-century he was a formidable Christian leader of the anti-Ummayad forces in southern Iberia.
Ibn Hafsun was a Muslim rebel leader who led a prolonged rebellion against the Islamic Caliphate in Al-Andalus (Islamic Spain) in the 9th and 10th centuries. His rebellion began in 881, and he managed to establish his own state in the region of Bobastro, which lasted for over three decades. He was able to hold off the forces of the Caliphate for a long time, but was ultimately defeated and killed in 917. He is considered as one of the most powerful and influential figures of the time in Al-Andalus.