Кордовский халифат
Following the demise of the Caliphate of Córdoba, the town was ravaged by Berbers, bringing its prosperity to an end.