The Messenger of Allah ﷺ said, "The caliphate in my nation will last thirty years, then there will be kingship after that."Then Safina said to me, "Count the caliphate of Abu Bakr."Then he said, "And the caliphate of Umar, and the caliphate of Uthman."Then he said to me, "Count the caliphate of Ali."He said, "So we found it to be thirty years."Saeed said, I said to him, "The Banu Umaya claim that the caliphate belongs to them."He replied, "The sons of Zarqa have lied. Rather, they are kings, among the worst of kings."
حدثنا أحمد بن منيع حدثنا سريج بن النعمان حدثنا حشرج بن نباتة عن سعيد بن جمهان قال
قال رسول الله ﷺ الخلافة في أمتي ثلاثون سنة ثم ملك بعد ذلك ثم قال لي سفينة أمسك خلافة أبي بكر ثم قال وخلافة عمر وخلافة عثمان ثم قال لي أمسك خلافة علي قال فوجدناها ثلاثين سنة قال سعيد فقلت له إن بني أمية يزعمون أن الخلافة فيهم قال كذبوا بنو الزرقاء بل هم ملوك من شر الملوك
Sourcing, [its chain is hasan]. Ahmad narrated it, 5/221, from the hadith of Hashraj, and Abu Dawud, no. 4646, from the hadith of Saeed bin Jumhan with the same chain. Via the route of Tirmidhi, Ibn Athir narrated it in Usud al-Ghabah, 2/324, and Ibn Hibban graded it sahih, no. 1534 and 1535, as did Hakim, 3/71, and Ahmad bin Hanbal, and others.This subject also has a narration from Umar [previously mentioned, 2225] and Ali [Ahmad, 1/114], and they mean that the Messenger of Allah ﷺ did not explicitly state the name of the caliph, so there is no contradiction between the hadiths.