كتاب الإمارة
33  
The Book on Government
(53)
Chapter: The words of the prophet saws: "A Group of my Ummah will continue to Prevail on the basis of the Truth, and They will not be Harmed by those who oppose them."
(53)
باب قَوْلِهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «لاَ تَزَالُ طَائِفَةٌ مِنْ أُمَّتِي ظَاهِرِينَ عَلَى الْحَقِّ لاَ يَضُرُّهُمْ مَنْ خَالَفَهُمْ»
Sahih Muslim 1922

It has been narrated on the authority of Jabir b. Samura that the Prophet (ﷺ) said:

This religion will continue to exist, and a group of people from the Muslims will continue to fight for its protection until the Hour is established.
وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَمُحَمَّدُ بْنُ بَشَّارٍ، قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنْ سِمَاكِ بْنِ حَرْبٍ، عَنْ جَابِرِ بْنِ سَمُرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم أَنَّهُ قَالَ ‏ "‏ لَنْ يَبْرَحَ هَذَا الدِّينُ قَائِمًا يُقَاتِلُ عَلَيْهِ عِصَابَةٌ مِنَ الْمُسْلِمِينَ حَتَّى تَقُومَ السَّاعَةُ ‏"‏ ‏.‏
Reference : Sahih Muslim 1922
In-book reference : Book 33, Hadith 248
USC-MSA web (English) reference : Book 20, Hadith 4717
  (deprecated numbering scheme)