Mu'awiya and his father Abu Sufyan had opposed Muhammad, their distant Qurayshite kinsman and later Mu'awiya's brother-in-law, until Muhammad captured Mecca in 630. Afterward, Mu'awiya became one of Muhammad's scribes. He was appointed by Caliph Abu Bakr () a deputy commander in the conquest of Syria. He moved up the ranks until becoming governor of Syria during the reign of his kinsman, Caliph Uthman (). He allied with the province's powerful Banu Kalb tribe, developed the defenses of its coastal cities and directed the war efforts against the Byzantine Empire, including the first Muslim naval campaigns. After Uthman's assassination in 656, Mu'awiya took up the cause of avenging the caliph and opposed his successor, Ali. During the First Muslim Civil War, the two led their armies to a stalemate at the Battle of Siffin in 657, prompting an abortive series of arbitration talks to settle the war. Afterward, Mu'awiya gained recognition as caliph by his Syrian supporters and his ally Amr ibn al-As, who conquered Egypt from Ali's governor in 658. After the assassination of Ali in 661, Mu'awiya compelled Ali's son and successor Hasan to abdicate in Kufa and Mu'awiya's suzerainty was acknowledged throughout the Caliphate.