It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that Dimad came to Makkah; he was from Azd Shanu'ah and used to perform ruqyah (incantation) against magic. He heard the foolish people of Makkah saying that Muhammad (peace and blessings be upon him) was insane. He thought: If I were to see this man, perhaps Allah would cure him at my hands. Dimad met him (peace and blessings be upon him) and said: O Muhammad! I perform ruqyah for this illness, and Allah cures whomever He wills at my hands; do you also have this illness? So the Messenger of Allah (peace and blessings be upon him) recited the sermon: 'Inna al-hamda lillahi nahmaduhu wa nasta'inuhu, man yahdihillahu fala mudilla lahu, wa man yudlil fala hadiya lahu, wa ashhadu an la ilaha illallahu wahdahu la sharika lahu, wa anna Muhammadan 'abduhu wa rasuluhu, amma ba'd' "All praise is for Allah; we praise Him and seek His help. Whomever He guides, none can lead astray, and whomever He leads astray, none can guide.
I bear witness that there is no god but Allah, He is alone and has no partner, and that Muhammad (peace and blessings be upon him) is His servant and Messenger." Dimad said: Repeat these words of yours, so the Prophet (peace and blessings be upon him) recited these words three times. Dimad said: I have heard the speech of soothsayers, and I have also heard the speech of sorcerers and poets, but I have never heard words like these, for they are supremely eloquent. Dimad said: Extend your hand; I pledge allegiance to you on Islam. Then he pledged allegiance. The Messenger of Allah (peace and blessings be upon him) said: "On behalf of your people as well?" Dimad said: Yes, on behalf of my people as well. The Messenger of Allah (peace and blessings be upon him) sent out a military detachment, and they passed by Dimad's people. The commander of the army said: Did you take anything from these people? A man said: I took a water vessel. He said: Return it, for these are the people of Dimad.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجمعة / 5801