The Arab Islamic conquest in the mid-7th century AD established Islam in Iraq and saw a large influx of Arabs. Under the Rashidun Caliphate, the prophet Muhammad's cousin and son-in-law, Ali, moved his capital to Kufa when he became the fourth caliph. The Umayyad Caliphate ruled the province of Iraq from Damascus in the 7th century. (However, eventually there was a separate, independent Caliphate of Córdoba in Iberia.)