Facsimile · p. 241
Mu'awiyah and his followers when Marwan ibn al-Hakam defeated him in rule. They spread the word that a Sufyani (attributed to a grandfather of the Aw'un tribe) would appear at the end of time, a servant of God, who would rid the nation of injustice. A similar saying also emerged among the Abbasids, which spoke of the righteous one as the one with the black banners who would emerge from the East, overthrow the Umayyad throne, establish justice, and rule by truth.
A collection of hadiths spread among Muslims of various sects, stating that a man from the Household of the Prophet would appear at the end of time, saving the Islamic nation from injustice and oppression, and ruling it by truth and justice. These hadiths, alongside Shi'ite books, were narrated in a number of Sunni books such as Sahih al-Tirmidhi, Sunan Abi Dawud, Sunan Ibn Majah, and Mustadrak al-Hakim al-Naysaburi. "If only a day remained of the world, God would lengthen that day until He sent a man from my Household whose name would be like my name and his father's name like my father's name. He would fill the earth with equity and justice as it had been filled with tyranny and injustice." And from them is what was narrated from Sa'id ibn al-Musayyib, who said: We were with Umm Salamah and we were discussing the Mahdi, and she said: I heard the Messenger of God, peace be upon him, say: The Mahdi is from the descendants of Fatimah. Some have collected these hadiths to fifty.
Bukhari and Muslim did not include these hadiths in their Sahih collections, which led the Sunnis to divide between those who believed in the concept of the awaited Mahdi based on the authentication of the hadiths related to him, and those who rejected this concept and refuted it based on the weakening of those hadiths. However, those among the Sunnis who believed in the Mahdi did not make it a fundamental principle of their faith.
See: Ahmad Amin, Duha al-Islam, p. 55, and Van Vloten, Arab Sovereignty, 3/238. See the previous two sources: the same pages. Some hadiths circulated about the one with the black banners, perhaps the most famous being the hadith known as the Hadith of the Banners, narrated by Ibn Majah in the Book of Tribulations, Chapter on the Emergence of the Mahdi. Narrated by Abu Dawud in the Book of the Mahdi. Also narrated by Tirmidhi in the Tribulations. Narrated by Ibn Majah in the Book of Tribulations, Chapter on the Emergence of the Mahdi, and by Tirmidhi in the Tribulations. And thereafter. Ibn al-Mahdi al-Muntadhar: See these hadiths in: Abu al-Fadl Abd Allah ibn Muhammad ibn al-Siddiq, and thereafter. Ibn Khaldun, The Muqaddimah, p. 241, 279.