Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrated: We were with the Prophet (peace and blessings be upon him) when we heard a caller calling out: Allahu akbar, Allahu akbar. So the Prophet (peace and blessings be upon him) said: "He is upon the fitrah (natural disposition)." Then he said: I bear witness that there is no god but Allah. He (peace and blessings be upon him) said: "He has come out of Hellfire because of this word." So we rushed towards him, and saw that he was a shepherd among his goats; the time of prayer had come to him, so he called the adhan.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10026