Caliphate of Córdoba
Following the demise of the Caliphate of Córdoba, the town was ravaged by Berbers, bringing its prosperity to an end.