The third caliph Uthman drew the ire of the Muslim settlers of the conquered lands as a consequence of his controversial policies, which were seen by many as nepotistic and interfering in provincial affairs. In 656 he was killed by the provincial rebels in Medina, then capital of the Caliphate, after which Ali, the cousin and son-in-law of Muhammad, was recognized as caliph by the Medinese people and the rebels. In the consequent first Islamic civil war (656–661), Mu'awiya opposed Ali from his stronghold in Syria, fighting him to a stalemate at the Battle of Siffin in 657. In January 661 Ali was assassinated by a Kharijite (a faction opposed to Ali and Mu'awiya), after which his son Hasan was recognized as his successor. In August, Mu'awiya, who had already been recognized as caliph by his partisans in Syria, led his army toward Kufa, the capital of Hasan and Ali in Iraq, and gained control over the rest of the Caliphate by securing a peace treaty with Hasan. The terms of the treaty stipulated that Mu'awiya would not nominate a successor. Although the treaty brought a temporary peace, no framework of succession was established.