Marwan I
As Uthman ibn Affan became very old, Marwan I, a relative of Muawiyah, slipped into the vacuum, becoming his secretary and slowly assuming more control. When Uthman was assassinated in 656, Ali ibn Abi Talib, a cousin and son-in-law of Muhammad, assumed the position of caliph and moved the capital to Kufa in Iraq. Muawiyah I, the governor of Syria, and Marwan I demanded arrest of the culprits. Marwan I manipulated every one and created conflict, which resulted in the first civil war (the "First Fitna"). Ali was assassinated by Kharijites in 661. Six months later in 661, in the interest of peace, Ali's son Hasan, made a peace treaty with Muawiyah I. In the Hasan–Muawiya treaty, Hasan ibn Ali handed over power to Muawiya on the condition that he would be just to the people and not establish a dynasty after his death. Muawiyah subsequently broke the conditions of the agreement and established the Umayyad dynasty, with a capital in Damascus. Husayn ibn Ali, by then Muhammad's only living grandson, refused to swear allegiance to the Umayyads. He was killed in the Battle of Karbala the same year, in an event still mourned by Shia on the Day of Ashura. Unrest, called the Second Fitna continued, but Muslim rule was extended under Muawiyah to Rhodes, Crete, Kabul, Bukhara, and Samarkand, and expanded in North Africa. In 664, Arab armies conquered Kabul, and in 665 pushed into the Maghreb.