User:Albertatiran/sandbox11

Abū al-Qāsim Muḥammad ibn al-Ḥanafiyya (محمد بن الحنفية) (15–81 AH; c. AD 637–700) was a son of Ali ibn Abi Talib, who was the fourth Rashidun caliph ((r. 656 – 661)) and the first Shia imam. Ibn al-Hanafiyya was an effective lieutenant for his father Ali during his caliphate. After the assassination of Ali and the deaths of his two sons Hasan and Husayn, many recognized Ibn al-Hanafiyya as the head of the House of Ali. Claiming to represent Ibn al-Hanafiyya, Mukhtar al-Thaqafi rose in Iraq in 686 to avenge Husayn and his relatives, who were massacred in 680 CE by the Umayyad caliph Yazid bin Mu'awiya ((r. 680 – 683)). The quiescent Ibn al-Hanafiyya did not actively associate with this rebellion but was still rescued by Mukhtar when he was detained by the rival caliph Ubayd Allah ibn Ziyad. Support for Ibn al-Hanafiyya continued even after the defeat and death of Mukhtar in 686–687 in the form of the Kaysanites, a now-extinct Shia sect that traced the imamate to Ibn al-Hanafiyya and his descendants, particularly his son Abu Hashim. The Kaysanites later provided the organizational structure for the Abbasids, who successfully overthrew the Umayyads in 750–751.

Birth
Often known by his title Ibn al-Hanafiyya, Muhammad was born to Khawla bint Ja'far, a woman from the Banu Hanifa tribe, and Ali ibn Abi Talib, a cousin of the Islamic prophet Muhammad. Ali is also recognized as the fourth Rashidun caliph ((r. 656 – 661)) and the first Shia imam. Ibn al-Hanafiyya was either born in 16 AH (637–638 CE), or circa 633. He was the only child of Khawla, a freed slave, whom Ali had married some time after the death of his first wife Fatima, daughter of Muhammad.

Early life
Soon after the assassination of the third Rashidun caliph Uthman ibn Affan ((r. 644 – 656)), Ali was elected to the caliphate in Medina. During his caliphate, Ibn al-Hanafiyya accompanied Ali in battles, as his champion and standard-bearer. When Ali was assassinated in Kufa in January 661, his eldest son Hasan was elected caliph there, but later abdicated in favor of Mu'awiya ((r. 661 – 680)) in August 661. Hasan was poisoned and killed in 669 in Medina, most likely at the instigation of Mu'awiya, who thus paved the way for the succession of his son Yazid ((r. 680 – 683)), often portrayed by Muslim historians as impious and immoral. Hasan was thus succeeded by his younger brother Husayn as the head of Muhammad's family. When the Umayyad Marwan and the prophet's widow Aisha prevented the burial of Hasan near his grandfather, Ibn Hanafiyya is said to have convinced Husayn to bury their brother in the Baqi Cemetery.

Battle of Karbala
Upon Mu'awiya's death and Yazid's accession in 680, the latter instructed his governor of Medina to secure Husayn's pledge of allegiance by force. Husayn immediately left for Mecca to avoid recognizing Yazid as the caliph. There Husayn received some letters of support from Kufans, whose intentions were verified by his envoy, Muslim ibn Aqil. Among many others, Ibn al-Hanafiyya is said to have warned Husayn about the poor reputation of the Kufans, suggesting that he should avoid them and instead stay in Mecca or hide somewhere until necessary. Husayn ignored such warnings, saying that he expected to be killed while fighting the tyranny of Yazid. On their way to Kufa, Husayn's small caravan was intercepted by the Umayyad army. There he was killed in the Battle of Karbala in 680, alongside most of his male relatives and his small retinue, having been surrounded for some days and deprived of the drinking water of the nearby Euphrates River. After the battle, the women and children in Husayn's camp were taken prisoner and marched to the Umayyad capital Damascus in Syria. The promised Kufan support did not materialize as Ubayd Allah ibn Ziyad, the new governor of Kufa, killed Husayn's envoy and intimidated Kufan tribal chiefs. Unlike Husayn, the quiescent Ibn al-Hanafiyya is said to have pledged his allegiance to Yazid.

Uprising of Mukhtar
After the death of Husayn, his only surviving son, Ali ibn Husayn Zayn al-Abidin, retired to an apolitical life in Medina. Ibn al-Hanafiyya was thus considered by many as the head of the House of Ali. Indeed, Mukhtar al-Thaqafi soon claimed to represent Ibn Hanafiyya in Kufa, where he called for revenge for the Karbala massacre. His efforts were bolstered by the defeat of the alternative Tawwabun rebellion in 684. In 686, Mukhtar eventually seized control of Kufa from Abd Allah ibn Zubayr, who had in 680 established an alternative caliphate in Mecca that rivalled the Umayyads. It is doubtful that Mukhtar actually represented the quiescent Ibn Hanafiyya. Nevertheless, his noncommittal response was interpreted by a Kufan delegation as an implicit endorsement of Mukhtar, which in turn strengthened his support among Kufans.

Mahdi
Mukhtar likely considered Ibn Hanafiyya as the rightful imam after Husayn's death, referring to him as Ali's (only remaining) wasi (lit. 'legatee'). Mukhtar also referred to Ibn Hanafiyya as the Mahdi (lit. 'the rightly-guided one'), that is, the leader who would deliver Muslims from oppression and establish a just rule. At this point, this title for Ibn Hanafiyya likely did not have any messianic implications. He apparently did not wish to be greeted by this title, as he remained in his hometown of Medina and declined active leadership of the rebellion. Perhaps an indication of his equivocal attitude towards this rebellion, the Alid leader is said to have been represented in some later Hajj pilgrimages by his personal flag.

Avenging Husayn
True to his promise, Mukhtar killed several figures thought to be responsible for the Karbala massacre, including the Kufa governor Ibn Ziyad and the Umayyad commander Umar ibn Sa'd, whose head was then sent to Ibn Hanafiyya by some accounts. Also killed was Shamir ibn Dhi al-Jawshan, often thought to be responsible for beheading Husayn in Karbala. Murra ibn Munqidh al-Abdi is said to have killed Husayn's son Ali al-Akbar. Murra survived a revenge attempt but was severely wounded. Asma ibn Kharija al-Fazari and Muhammad ibn al-Ash'ath al-Kindi escaped unharmed. The former was sought for his role in killing Muslim ibn Aqil and the latter was accused of insulting Husayn in Karbala.

Confrontation with Ibn Zubayr
Ibn Hanafiyya had earlier refused to pledge his allegiance to Ibn Zubayr, the self-proclaimed caliph in Mecca, saying that he preferred to wait for communal consensus, although some have instead suggested that Ibn Hanafiyya might have had his own ambitions for the high office. Ibn Zubayr eventually imprisoned Ibn Hanafiyya in Mecca, probably alarmed by his refusal to take the oath of allegiance and by the takeover of Kufa by his champion Mukhtar. Ibn Hanafiyya now wrote to Mukhtar for help, who sent military detachment(s) and rescued Ibn Hanafiyya. The latter then settled in Mina, near Mecca, and later in Ta'if. The rescue mission is said to have been bloodless, as Ibn Hanafiyya had forbidden Mukhtar's men from fighting in the sanctuary of Mecca. This appeal for help may suggest that the passive attitude of Ibn Hanafiyya towards Mukhtar has been exaggerated.

Death of Mukhtar
Mukhtar was defeated and killed in 686–687, yet Ibn Hanafiyya was not compromised afterward, which perhaps indicates his weak ties with Mukhtar. Ibn Hanafiyya continued to withhold his support from the two rival caliphates until the fall of the Zubayrids in 692, at which point he pledged his allegiance to the Umayyad caliph Abd al-Malik ((r. 685 – 705)). By some accounts, he visited the caliph in Damascus in 692, and was compensated generously by him.

Kaysanites
The now-extinct Kaysanites was a Shia sect that traced the imamate back to Ibn Hanafiyya and his descendants. They emerged from the uprising of Mukhtar, whose death did not end the propaganda in favor of Ibn Hanafiyya. The Kaysanites condemned the predecessors of Ali ibn Abi Talib as usurpurs of his right to succeed the Islamic prophet Muhammad. Most of them regarded Hasan, then Husayn, and finally Ibn Hanafiyya as the divinely-appointed imams after Ali ibn Abi Talib. When Ibn Hanafiyya died in 700–701, or in 703 or 705, most Kaysanites followed his son Abu Hashim, but some thought that Ibn Hanafiyya had entered occultation, that is, providentially concealed from mankind until his would reappear by divine will. This was perhaps when the concept of Mahdi entered the mainstream as the eschatological leader who would eradicate injustice and evil in the end of time. As the last (notable) son of Ali, the death of Ibn Hanafiyya also contributed to divisions in the Shia community. It is difficult to estimate the numerical strength of the Kaysanites. Late during the Umayyad period, they likely outnumbered the imamite Shias, who followed a Husaynid line of imams. Indeed, Ibn Hanafiyya and later his successor Abu Hashim diverted considerable support from Ali Zayn al-Abidin and his successor Muhammad al-Baqir, for neither of the two laid any public claims to the imamate.

The movement of Mukhtar ultimately paved the way for the overthrow of the Umayyads, as the Kaysanites provided the organizational structure for the successful rebellion of the Abbasids, who claimed descent from Muhammad's paternal uncle, Abbas. They claimed that Abu Hashim was succeeded to the imamate by the head of the Abbasid family, Muhammad ibn Ali. This was apparently the main Abbasid claim to legitimacy until they declared later that Abbas was the heir of the Islamic prophet Muhammad rather than his cousin and son-in-law, Ali ibn Abi Talib. The Abbasids thus gradually turned against the mainstream Shia, carrying with themselves large numbers of the Kaysanites to Sunnism.