In 656, the Islamic conquests came to a halt when the leader Uthman died and Muhammad's cousin Ali was controversially elected the next caliph. This sudden change from Sunni to Shia Islam led to a civil war, resulting in a Sunni victory and the establishment of the new Umayyad Caliphate in 661, named after the Umayyad clan from which the new ruler came.
This new caliphate continued the conquests and took control of modern-day Afghanistan from various tribal communities. Then, in 665, new expansion began in North Africa, with Islamic rule extending as far as Morocco by 670