It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) said:
“The affairs of the Children of Israel were administered by their Prophets. Every time a Prophet left, he was followed by another, but there will be no Prophet among you after I am gone.” They said: “What will happen, O Messenger of Allah?” He said: “There will be caliphs and there will be many of them.” They said: “What should we do?” He said: “Fulfill your pledge to the first one, then the one who comes after him, and do the duties required of you, for Allah will question them about the duties upon them.”