After the third caliph Uthman's assassination by rebels in 656, the rebels and the townspeople of Medina declared Ali, a cousin and son-in-law of the Islamic prophet Muhammad, caliph. Some of Muhammad's companions including Talha ibn Ubayd Allah, Zubayr ibn al-Awam and Mu'awiya ibn Abi Sufyan (then governor of Syria), and Muhammad's widow A'isha, refused to recognize Ali. They called for revenge against Uthman's killers and the election of a new caliph through shura (consultation). These events precipitated the First Fitna (First Muslim Civil War). When Ali was assassinated by Abd-al-Rahman ibn Muljam, a Kharijite, in 661, his eldest son Hasan succeeded him but soon signed a peace treaty with Mu'awiya to avoid further bloodshed. In the treaty, Hasan was to hand over power to Mu'awiya on the condition that Mu'awiya be a just ruler and that he would not establish a dynasty.[b] After the death of Hasan in 670, his younger brother Husayn became the head of the Banu Hashim clan to which the Islamic prophet Muhammad also belonged. Though his father's supporters in Kufa gave him their allegiance, he would abide to the peace treaty between Hasan and Mu'awiya as long as the latter was alive.
The Battle of Karbala occurred within the crisis resulting from the succession of Yazid I. In 676, Mu'awiya nominated his son Yazid as successor, a move labelled by the historian Wilferd Madelung as breach of the Hasan–Muawiya treaty. With no precedence in Islamic history, hereditary succession aroused opposition from several quarters. Mu'awiya summoned a shura, or consultative assembly, in Damascus and persuaded representatives from many provinces to agree to his plan by diplomacy and bribes. He then ordered Marwan ibn al-Hakam, then the governor of Medina, where Husayn and several other influential Muslims resided, to announce the decision. Marwan faced resistance to this announcement, especially from Husayn, Abd Allah ibn al-Zubayr, Abd Allah ibn Umar and Abd al-Rahman ibn Abi Bakr, the sons of Muhammad's prominent companions, all of whom, by virtue of their descent, could also lay claim to the caliphal title. Mu'awiya went to Medina and pressed the four dissenters to accede. He followed and threatened some of them with death, but they still refused to support him. Nonetheless, Mu'awiya convinced the people of Mecca that the four had pledged their allegiance, and received allegiance from them for Yazid. On his return to Damascus, he secured allegiance from the people of Medina as well. There was no further overt protest against the plan for Yazid's succession. According to the historians Fitzpatrick and Walker, Yazid's succession, which was considered as an "anomaly in Islamic history", transformed the government from a "consultative" form to a monarchy. Before his death in April 680, Mu'awiya cautioned Yazid that Husayn and Ibn al-Zubayr might challenge his rule and instructed him to defeat them if they did. Yazid was further advised to treat Husayn with caution and not to spill his blood, since he was the grandson of Muhammad.