Yunus bin Maysarah bin Halbas narrates: I heard Sayyiduna Mu'awiyah bin Abi Sufyan (may Allah be pleased with him) say: I heard the Messenger of Allah (peace and blessings be upon him) say: "Whomever Allah intends good for, He grants him understanding of the religion."
Sayyiduna Mu'awiyah (may Allah be pleased with him) says: And the Messenger of Allah (peace and blessings be upon him) came out to us and said: "Do you say that I will be the last of you to die?" We said: Yes. He (peace and blessings be upon him) said: "Rather, I will be the first of you to die, then you will follow me in successive groups, one of you following another."
And I heard the Messenger of Allah (peace and blessings be upon him) say: "A group from my Ummah will always remain steadfast upon the truth, not caring about those who oppose them or those who forsake them, until the command of Allah comes while they are dominant over the people."
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 16955