The Prophet (peace and blessings be upon him) said:
"When the pledge of allegiance is given to two caliphs (at the same time), kill the latter (the second) of the two."
Hadith Referenceصحیح الجامع الصغیر / حرف الألف / 421
Hadith Gradingالألبانی:صحيح
Hadith Takhrij[حم م] عن أبي سعيد. مختصر مسلم ١٢٠٠.