The Messenger of Allah ﷺ used to launch raids at dawn. He would listen for the call to prayer. If he heard the adhan being called, he would hold back, and if not, he would attack.He heard a man saying, "Allah is the greatest, Allah is the greatest."The Messenger of Allah ﷺ said, "Upon the natural disposition."Then the man said, "I bear witness that there is no god but Allah, I bear witness that there is no god but Allah."The Messenger of Allah ﷺ said, "You have come out of the Fire."They looked, and there he was, a goatherd.
كان رسول الله ﷺ يغير إذا طلع الفجر، وكان يستمع الأذان، فإن سمع أذانا أمسك وإلا أغار، فسمع رجلا يقول: الله أكبر الله أكبر، فقال رسول الله ﷺ: على الفطرة ثم قال: أشهد أن لا إله إلا الله، أشهد أن لا إله إلا الله، فقال رسول الله ﷺ: خرجت من النار فنظروا فإذا هو راعي معزى.
Muslim narrated it in his chapter on prayer (382) via Hammad bin Salama, who said, Thabit narrated to us from Anas bin Malik, and he related the hadith. Bukhari narrated it in his chapter on jihad (2943) through another route from Anas bin Malik, in abridged form.His saying, "upon the fitrah," means upon Islam. His saying, "he came out of the fire," means by way of monotheism. As for his saying, "and there he was, a shepherd of goats," Nawawi said, "This has been used as evidence that the adhan is prescribed even for someone praying alone, and this is the sahih position in our school and in the school of others." End of quote.