The castle of Archidona, with its impressive views, was built by the Arabs in the 9th century and later rebuilt by Alhamar, the first nazarí king, in the 13th century.