The Messenger of Allah ﷺ said, "The Children of Israil were governed by their prophets. Whenever one prophet passed away, another prophet succeeded him. But there will be no prophet after me among you."They asked, "What will happen then, Messenger of Allah?"He replied, "There will be caliphs, and they will be many."They asked, "What should we do?"He said, "Fulfill the pledge of allegiance to the first one, then the next. Give them their due, for Allah will question them about what was entrusted to them."
حدثنا أبو بكر بن أبي شيبة حدثنا عبد الله بن إدريس عن حسن بن فرات عن أبيه عن أبي حازم
قال رسول الله ﷺ إن بني إسرائيل كانت تسوسهم أنبياؤهم كلما ذهب نبي خلفه نبي وأنه ليس كائن بعدي نبي فيكم قالوا فما يكون يا رسول الله قال تكون خلفاء فيكثروا قالوا فكيف نصنع قال أوفوا ببيعة الأول فالأول أدوا الذي عليكم فسيسألهم الله عز وجل عن الذي عليهم
No references are available.
Reported by Bukhari, Hadiths of the Prophets, chapter on what was mentioned about Banu Israil, no. 3455, from the hadith of Furat Qazzaz, through him, and Muslim, Leadership, chapter on the obligation of fulfilling allegiance to the earlier caliphs before the later ones, no. 1842, from Ibn Abu Shayba, through him.