The Prophet (ﷺ) said, "The Israelis used to be ruled and guided by prophets: Whenever a prophet died, another would take over his place. There will be no prophet after me, but there will be Caliphs who will increase in number." The people asked, "O Allah's Messenger (ﷺ)! What do you order us (to do)?" He said, "Obey the one who will be given the pledge of allegiance first. Fulfil their (i.e. the Caliphs) rights, for Allah will ask them about (any shortcoming) in ruling those Allah has put under their guardianship."
Reference: Sahih al-Bukhari 3455 In-book : Book 60, Hadith 122 USC-MSA web (English) : Vol. 4, Book 55, Hadith 661 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.