It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) used to attack when dawn broke, and he (peace and blessings be upon him) would listen for the adhan: if he heard the adhan he would hold back, and if not he would attack. He (peace and blessings be upon him) heard a man saying: 'Allahu akbar, Allahu akbar' (Allah is the Greatest, Allah is the Greatest), and the Messenger of Allah (peace and blessings be upon him) said: "He is upon the fitrah." Then he said: 'Ashhadu an la ilaha illallah' (I bear witness that there is no god but Allah), and the Messenger of Allah (peace and blessings be upon him) said: "He has come out of the Fire." The Companions looked, and he was a goatherd.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 1902