The Messenger of Allah ﷺ said, "Whoever is saved from three has truly been saved." He repeated this three times.They asked, "What are they, Messenger of Allah?"He replied, "My death, the killing of a caliph who stands firm upon the truth and gives it its due, and the Dajjal."
عن رسول الله ﷺ أنه قال: من نجا من ثلاث فقد نجا قاله ثلاث مرات، قالوا: ماذا يا رسول الله؟ قال: موتي، ومن قتل خليفة مصطبر بالحق يعطيه، والدجال.
Ahmad narrated it (22488), as did Ibn Abu Shayba (38630), and Hakim graded it sahih (3/101), all of them through various routes from Layth bin Saad, who said, Yazid bin Abu Habib told me, from Rabia bin Laqit Tujibi, from Abdullah bin Hawala Azdi, and he related it.Its chain is hasan because of Rabia bin Laqit Tujibi, for his hadith is hasan. A number of narrators transmitted from him, and Ajli said, "A trustworthy successor." Ibn Hibban mentioned him among the trustworthy narrators (4/230) and said, "The people of Egypt narrated from him." Hakim said, "Its chain is sahih."As for his saying "my death," this indeed occurred just as the Prophet ﷺ foretold. The people were tested at his death, for some doubted his death, and some apostatized after his death. Allah saved the believers through Abu Bakr, who delivered his famous sermon, "Whoever used to worship Muhammad, then Muhammad has died, but whoever worships Allah, then Allah is alive and does not die." He removed doubt from the hearts of the believers, just as he fought the people of apostasy and rescued the Muslims from a tremendous trial.As for his saying "whoever kills a caliph who is steadfast upon the truth," this means whoever kills a caliph who upholds the truth and fulfills the duties of his caliphate in tending to the nation and its interests.As for his saying "Dajjal," this refers to the Dajjal the Messiah who will appear at the end of time.