The Messenger of Allah ﷺ used to launch raids at the break of dawn. He would listen carefully, and if he heard the call to prayer, he would hold back; otherwise, he would attack.One day, he listened and heard a man saying, "Allah is the greatest, Allah is the greatest."The Prophet ﷺ said, "He is upon the natural disposition."Then the man said, "I bear witness that there is no god but Allah."The Prophet ﷺ said, "You have escaped the Fire."
حدثنا عبد الرحمن حدثنا حماد بن سلمة عن ثابت
كان رسول الله ﷺ يغير عند طلوع الفجر فيستمع فإذا سمع أذانا أمسك وإلا أغار قال فتسمع ذات يوم قال فسمع رجلا يقول الله أكبر الله أكبر فقال على الفطرة فقال أشهد أن لا إله إلا الله فقال خرجت من النار
Its isnad is sahih. Bukhari narrated the hadith in 2/89, no. 610, Fath, in the Book of Adhan, the chapter on what bloodshed is prevented by the adhan, connecting it with the hadith of Khaybar. Muslim narrated something similar in 1/288, no. 382, in the Book of Prayer, the chapter on refraining from raiding a people. Tirmidhi narrated it in 4/163, no. 1618, in the Book of Military Expeditions, the chapter on what has been reported concerning the Prophet's ﷺ instructions, and he said, hasan sahih. Bayhaqi narrated it in 1/405.