Mu'awiya I was the founder and first caliph of the Umayyad Caliphate. Previously, he served as the governor of Syria under his cousin and caliph Uthman (r. 644–656). After Uthman was murdered, Mu'awiya demanded Uthman's killers to be punished, though Ali (r. 656–661) didn't punish. Mu'awiya subsequently went to war with Ali for a few years. Ali was killed in January 661 and Hasan was elected caliph. Hasan gave the caliphate to Mu'awiya and both made peace. During the last years of his caliphate, Mu'awiya declared his son Yazid to be his successor; a move which was opposed by several Muslim leaders, including Husayn ibn Ali.