The Messenger of Allah ﷺ said, "The caliphate of prophethood will last thirty years, then Allah will grant kingship," or, "His kingship to whomever He wills."Saeed said, Safina said to me, "Keep count: Abu Bakr for two years, Umar for ten, Uthman for twelve, and Ali for such and such."Saeed continued, I said to Safina, "These people claim that Ali was not a caliph."He replied, "The backsides of the sons of Zarqa are lying," meaning the sons of Marwan.
حدثنا سوار بن عبد الله حدثنا عبد الوارث بن سعيد عن سعيد بن جمهان
قال رسول الله ﷺ خلافة النبوة ثلاثون سنة ثم يؤتي الله الملك أو ملكه من يشاء قال سعيد قال لي سفينة أمسك عليك أبا بكر سنتين وعمر عشرا وعثمان اثنتي عشرة وعلي كذا قال سعيد قلت لسفينة إن هؤلاء يزعمون أن عليا عليه السلام لم يكن بخليفة قال كذبت أستاه بني الزرقاء يعني بني مروان
[Its isnad is hasan] Reported by Tirmidhi, in the Chapters on Tribulations, the chapter on what has been said regarding the caliphate, hadith no. 2226, from the hadith of Saeed bin Jumhan, with this wording. He said, hasan. Ibn Hibban graded it sahih, hadith nos. 1534, 1535.