It wasnarrated from Abu Hurairah that the Messenger of Allah (ﷺ)said:
"The affairs of the Children of Israel were administered bytheirProphets. Every time a Prophet left, he was followed by another,butthere will be no Prophet among you after I am gone." They said:"What will happen, O Messenger of Allah?" He said: "There willbecaliphs and there will be many of them." They said: "Whatshould wedo?" He said: "Fulfill your pledge to the first one,then the one whocomes after him, and do the duties required of you,for Allah willquestion them about the duties upon them."
English reference: Vol. 4, Book 24, Hadith 2871
Arabic reference: Book 24, Hadith 2981