Mishkat al-Masabih 660
وَعَنْ أَنَسٍ قَالَ: كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يُغِيرُ إِذَا طَلَعَ الْفَجْرُ وَكَانَ يَسْتَمِعُ الْأَذَانَ فَإِنْ سَمِعَ أَذَانًا أَمْسَكَ وَإِلَّا أَغَارَ فَسَمِعَ رَجُلًا يَقُولُ اللَّهُ أَكْبَرُ اللَّهُ أَكْبَرُ فَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «عَلَى الْفِطْرَةِ» ثُمَّ قَالَ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا اللَّهِ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «خَرَجْتَ من النَّار» فنظروا فَإِذا هُوَ راعي معزى. رَوَاهُ مُسلم
And from Anas, who said: The Prophet ﷺ used to make raids when dawn broke, and he would listen for the adhan. If he heard an adhan he held back, otherwise he raided. He heard a man saying: "Allahu akbar, Allahu akbar," and the Messenger of Allah ﷺ said: "Upon the fitrah." Then he said: "Ashhadu an la ilaha illallah," [and] the Messenger of Allah ﷺ [said]: "You have come out of the Fire." They looked, and he was a goatherd. Reported by Muslim.