كتاب الإمارة
33  
The Book on Government
(34)
Chapter: The virtue of Jihad and keeping watch over the frontier
(34)
باب فَضْلِ الْجِهَادِ وَالرِّبَاطِ ‏‏
Sahih Muslim 1888 a

It has been narrated on the authority of Abu Sa'id Khudri that a man came to the Prophet (may peace he upon him) and said:

Who is the best of men? He replied: A man who fights in the way of Allah spending his wealth and staking his life. The man then asked: Who is next to him (in excellence)? He said: Next to him is a believer who lives in a mountain gorge worshipping hid Lord and sparing men from his mischief.
حَدَّثَنَا مَنْصُورُ بْنُ أَبِي مُزَاحِمٍ، حَدَّثَنَا يَحْيَى بْنُ حَمْزَةَ، عَنْ مُحَمَّدِ بْنِ الْوَلِيدِ الزُّبَيْدِيِّ، عَنِ الزُّهْرِيِّ، عَنْ عَطَاءِ بْنِ يَزِيدَ اللَّيْثِيِّ، عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ، أَنَّ رَجُلاً، أَتَى النَّبِيَّ صلى الله عليه وسلم فَقَالَ أَىُّ النَّاسِ أَفْضَلُ فَقَالَ ‏"‏ رَجُلٌ يُجَاهِدُ فِي سَبِيلِ اللَّهِ بِمَالِهِ وَنَفْسِهِ ‏"‏ قَالَ ثُمَّ مَنْ قَالَ ‏"‏ مُؤْمِنٌ فِي شِعْبٍ مِنَ الشِّعَابِ يَعْبُدُ اللَّهَ رَبَّهُ وَيَدَعُ النَّاسَ مِنْ شَرِّهِ ‏"‏ ‏.‏
Reference : Sahih Muslim 1888a
In-book reference : Book 33, Hadith 182
USC-MSA web (English) reference : Book 20, Hadith 4652
  (deprecated numbering scheme)