Anas bin Malik reported,

The Prophet ﷺ would launch a raid only at the time of the Fajr prayer. If he heard an adhan, he would hold back, and if not, 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 fitrah."Then the man said, "I bear witness that there is no god but Allah."The Prophet said, "You have been saved from the Fire."Hasan said, Abu Walid also narrated to us, saying that Hammad bin Salama narrated to us with this chain of transmission the same report.

Tirmidhi 1618

Sahih

حدثنا الحسن بن علي الخلال حدثنا عفان حدثنا حماد بن سلمة حدثنا ثابت

عن أنس قال

كان النبي ﷺ لا يغير إلا عند صلاة الفجر فإن سمع أذانا أمسك وإلا أغار فاستمع ذات يوم فسمع رجلا يقول الله أكبر الله أكبر فقال على الفطرة فقال أشهد أن لا إله إلا الله فقال خرجت من النار قال الحسن وحدثنا أبو الوليد حدثنا حماد بن سلمة بهذا الإسناد مثله

الترمذي 1618صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Expeditions
Chapter
His ﷺ instructions regarding fighting
Numbering
Darussalam 1618
Tirmidhi 1618