Messenger of Allah and the last of the prophets” (al-Ahzab 33:40).
For that reason, whoever lays claim to prophethood after him is a disbelieving apostate who must be put to death, and whoever believes such a claimant is likewise a lying apostate who must be put to death unless he repents. The Prophet ﷺ is the Seal of the Prophets; nevertheless, Allah appointed for him successors—successors in knowledge and successors in authority. What is meant in this hadith by “successors” are the successors in authority.
Thus he said, “There will be caliphs and they will become many.” They asked, “O Messenger of Allah, what do you command us to do—whom should we pledge allegiance to?” He replied, “To the first, then to the first.” Once they have given the bayʿa (pledge of allegiance) to a caliph, it is binding on them to remain upon that pledge, to reject anyone who seeks the caliphate while the first is still alive, and to aid the first caliph against anyone who challenges him in his lifetime. Whoever contends with the ruler for his authority must be fought until the community is united. If people were left to chaos, so that anyone dissatisfied with the ruler could form a faction and fight him, affairs would collapse.
At the close of the hadith the Prophet ﷺ placed upon those caliphs the responsibilities that are due from them, while he charged us to fulfill the rights we owe them and to ask Allah for the rights that are due to us. We are not to say, “They have wronged, they have been unjust, they have failed to uphold justice,” and then rise up against them and refuse to obey them in what Allah has commanded us. No, that is not permissible. We must give them their due and ask Allah for what is due to us, just as a man maintains ties with a relative who has cut him off and asks Allah for his own right. To say, “I will only keep ties with whoever keeps ties with me,” or, “I will obey only a ruler who commits no oppression and does not monopolize wealth or anything else,” is a mistake. Do what is required of you and ask