Abd al-Rahman, grandson of the Umayyad caliph Hisham, escaped the Abbasid extermination of his family and eventually fled across North Africa to al-Andalus. He established the Umayyad Emirate of Córdoba, which would eventually conquer al-Andalus. In 929, it became the Caliphate of Córdoba when Abd al-Rahman III declared himself Caliph.