Riyad as-Salihin, Book 1, Hadith 598 (In-Book)

Abu Sa'id Al-Khudri (May Allah be pleased with him) reported: Someone asked Messenger of Allah: "Who is the best man?" He answered, "A believer who strives in the Cause of Allah with his life and his wealth." The man asked: "Who is the next?" He said, "One who retires into a narrow valley and worships his Rubb."Another narration is: Messenger of Allah said, "One who fears Allah and safeguards people against his own mischief."[Al-Bukhari and Muslim].

وعن أبي سعيد الخدرى رضي الله عنه قال‏:‏ قال رجل‏:‏ أى الناس أفضل يا رسول الله‏؟‏ قال‏:‏ ‏"‏مؤمن مجاهد بنفسه وماله فى سبيل الله‏"‏ قال‏:‏ ثم من‏؟‏ قال‏:‏ ‏"‏ رجل معتزل فى شعب من الشعاب يعبد ربه‏"‏ وفى رواية‏:‏ ‏"‏يتقي الله، ويدع الناس من شره‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

sunnah.com