Hisham II
On 15 February 1009, with Hisham II as caliph and Sanchuelo as hajib (and "de facto" ruler), a revolution broke out in Córdoba, which led to the proclamation of an alternative caliph. Berbers entered and sacked Córdoba in May 1013. Hisham III was routed from Córdoba on 30 November 1031 and an oligarchic republic replaced the caliphate.