It has been narrated on the authority of Aba Sa'id al-Khudri that the Messenger of Allah (ﷺ) said: When oath of allegiance has been taken for two caliphs, kill the one for whom the oath was taken later.
Explanation & Benefits
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary: Benefits and Issues: This hadith establishes that when the people have generally agreed upon the pledge of allegiance (bay‘ah) to one caliph (khalifah), and then another person seeks to take the pledge of allegiance for his own caliphate, and despite being prevented, does not desist, and there remains no option except to kill him, then he should be killed. For without this, the unity and oneness of the Muslim community (ummah) cannot be maintained, nor can it be protected from division and discord. However, today, in the name of religion and politics, for their own interests, power-seeking individuals have divided people into religious and political groups and parties, and then the vicious cycle of division upon division has begun. As a result, establishing unity and oneness in the ummah has become as difficult as extracting milk from a stone. For the goddess of elections, in whose praise odes are sung in the name of democracy, has given nothing but division to this day.
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 4799