The following is a sequence of events of Yahya's life:
In 850 C.E. Al-Mutawakkil brought Yahya from one of the Abbasid provinces in order to punish him, after he had reportedly assembled a group of supporters. Umar ibn Faraj al-Rukhkhaj Al-Sijistani[4] (one of the Abbasid's official secretaries who had purchased land for the founding of Samarra)[5] flogged him 18 lashes and he was incarcerated in Baghdad in the Matbaq Prison before being released.[6]
Yahya was hard pressed by his creditors and sought a grant from Umar ibn Faraj, but was harshly denied. He thus cursed Umar ibn Faraj and as a result was imprisoned, but was later set free. He then moved to live in Baghdad, but was still suffering from hardship. He then went to Samarra where he met another man whom he asked for a grant, but was again harshly denied.[7]
Yahya then went to Kufa, where he rebelled in 864 C.E. His uprising seems to have been a rash course of action. In Kufa, Yahya gathered a great throng of Bedouins and a contingent of Kufa also rallied around him. He then marched to Al-Fallujah and encamped at a village known as al-‘Umud. He then marched to Kufa and proceeded as far as the treasury, where he took whatever he found. Following this, he declared his rebellion in Kufa. He then liberated the two prisons of Kufa of all those interred. He then left Kufa for its agricultural hinterland (the Sawad) and settled in a place called Bustan. He was followed and supported by a group of Zaydis, Bedouins living near Bustan and people from other certain places near Kufa. After establishing himself at Bustan his followers grew in number.[8]
Yahya routed an Abbasid force sent to defeat him in a fierce battle near the Kufa bridge.[9]
The Zaydis propagandized that he was the chosen one (al-Rida) of Muhammad's family. This increased his popularity and even the mob of Baghdad held him in high esteem. In Kufa a group of experienced Shiites swore allegiance to him, along with other people. While he was in Kufa he was making preparations for his forces, while the Abbasid forces sent to defeat him were also making the necessary preparations.[10]
On the 13th Rajab (20 August) 864 C.E. he marched against the Abbasid forces of Husayn ibn Isma’il, after being urged to do so by his followers.[10]
The next day, Yahya's forces attacked Husayn ibn Isma’il forces, but were defeated and fled, abandoning Yahya on the battlefield.[10]
Yahya was then beheaded on the battlefield in Rajab 250 A.H. (August 864 C.E.) and his head was mutilated. His head was then sent to Al-Musta'in, from where it was displayed at the public gate in Samarra.[11][12]
Some of Yahya's companions did not accept the news that he was defeated and killed. Instead, they believed that he was not killed and he only hid himself and went into occultation and that he was the Mahdi and the Qa’im, who will reappear another time.
His revolt had an interesting sequel in 255 A.H. (868-69 C.E.), when ʿAlī ibn Muḥammad, the leader of the Zanj Rebellion, claimed to be the incarnated form of Yahya.[13]
Al-Masudi mentions that many elegies were written for Yahya, and that he had recorded some of them in his Kitab al-Awsat (The Middle Book). But in his book The Meadows of Gold, it is the elegy by Ibn Abi Tahir Tayfur (which Al-Masudi alone had preserved) that he gives pride of place. Ibn Abi Tahir's elegy on the crucified Zaydi rebel is composed of 14 lines and the poem was possibly recited in Samarra, where Yahya's head was displayed, or else before the large crowds that are known to have gathered in Baghdad. In the elegy, Ibn Abi Tahir attacks the SunniAbbasid Caliphal family for its usurpation of the rights of the house of Ali.[14]
Ibn al-Rumi (d.283 A.H. / 896 C.E.) also published elegies on Yahya.[15]