Abu Hurairah reported,

The Prophet ﷺ said, "The Children of Israil were governed by the prophets. Whenever one prophet died, another prophet succeeded him. But there will be no prophet after me. There will be caliphs, and they will be many."The companions asked, "What do you command us to do?"He replied, "Fulfill your pledge of allegiance to the first one, then the next, and give them their due, for Allah will question them about what He entrusted to their care."

Azami 7657

Sahih

عن أبي هريرة

عن النبي ﷺ قال: كانت بنو إسرائيل تسوسهم الأنبياء كلما هلك نبي خلفه نبي، وإنه لا نبي بعدي، وسيكون خلفاء فيكثرون قالوا: فما تأمرنا؟ قال: فوا ببيعة الأول فالأول، أعطوهم حقهم، فإن الله سائلهم عما استرعاهم.

الأعظمي 7657صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Leadership
Section
Fulfilling the pledge to the first imam, and not pledging to more than one imam in a single land
Numbering
Jami al-Kamil 7657 (2nd edition)
Azami 7657