Sahih Muslim Book 20, Hadith Number 4652.

Chapter : Merit of Jihad and of keeping vigilance (over the enemy).

It has been narrated on the authority of Abu Sa’id Khudri that a man came to the Holy 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.