Prophet Muhammad (peace be upon him) said:
«Among the people who came before you, there was a king who had a sorcerer, and when that sorcerer became old, he said to the king:
“I have become old and my time is nearly over, so please send me a boy whom I can teach magic.”
So, he sent him a boy and the sorcerer taught him magic. Whenever the boy went to the sorcerer, he sat with a monk who was on the way and listened to his speech and admired them.
So, when he went to the sorcerer, he passed by the monk and sat there with him; and on visiting the sorcerer the latter would thrash him. So, the boy complained about this to the monk. The monk said to him, “Whenever you are afraid of the sorcerer, say to him: `My people kept me busy.’ And whenever you are afraid of your people, say to them: `The sorcerer kept me busy.’
So the boy carried on like that (for some time). Then a huge terrible creature appeared on the road and the people were unable to pass by. The boy said:
“Today I shall know whether the sorcerer is better or the monk is better.”
So, he took a stone and said, “O Allah! If the deeds and actions of the monk are liked by You better than those of the sorcerer, then kill this creature so that the people can cross (the road).” Then he struck it with a stone killing it and the people passed by on the road.
The boy came to the monk and informed him about it. The monk said to him, “O my son! Today you are better than I, and you have achieved what I see! You will be put to trial. And in case you are put to trial, do not inform (them) about me.”
Curing the Blind
The boy used to treat the people suffering from congenital blindness, leprosy, and other diseases. There was a courtier of the king who had become blind and he heard about the boy. He came and brought a number of gifts for the boy and said, “All these gifts are for you on the condition that you cure me.”
The boy said, “I do not cure anybody; it is only Allah who cures people. So, if you believe in Allah and supplicate to Him, He will cure you.”
So, he believed in and supplicated to Allah, and Allah cured him.
Later, the courtier came to the king and sat at the place where he used to sit before. The king said,
“Who gave you back your sight”
The courtier replied, “My Lord.”
The king then said, “I did”
The courtier said, “No, my Lord and your Lord – Allah”
The king said, “Do you have another Lord beside me”
The courtier said, “Yes, your Lord and my Lord is Allah.”
The king tortured him and did not stop until he told him about the boy. So, the boy was brought to the king and he said to him, “O boy! Has your magic reached to the extent that you cure congenital blindness, leprosy and other diseases”
He said, “I do not cure anyone. Only Allah can cure.”
The king said, “Me”
The boy replied, “No.”
The king asked, “Do you have another Lord besides me”
The boy answered, “My Lord and your Lord is Allah.”
So, he tortured him also until he told about the monk. Then the monk was brought to him and the king said to him, “Abandon your religion.” The monk refused and so the king ordered a saw to be brought which was placed in the middle of his head and he fell, sawn in two.
Then it was said to the man who used to be blind, “Abandon your religion.” He refused to do so, and so a saw was brought and placed in the middle of his head and he fell, sawn in two.
Guarded by God
Then the boy was brought and it was said to him, “Abandon your religion.”
He refused and so the king sent him to the top of such and such mountain with some people. He told the people, “Ascend up the mountain with him till you reach its peak, then see if he abandons his religion; otherwise throw him from the top.” They took him and when they ascended to the top, he said: “O Allah! Save me from them by any means that You wish.” So, the mountain shook and they all fell down and the boy came back walking to the king.
The king said, “What did your companions (the people I sent with you) do”
The boy said: “Allah saved me from them.”»
So, the king ordered some people to take the boy on a boat to the middle of the sea, saying: “If he renounces his religion (well and good), but if he refuses, drown him.” So, they took him out to sea and he said: “O Allah! Save me from them by any means that you wish.” So they were all drowned in the sea
Then the boy returned to the king and the king said, “What did your companions do?”
The boy replied, “Allah, saved me from them.”
Then he said to the king, “You will not be able to kill me until you do as I order you. And if you do as I order you, you will be able to kill me.”
The king asked: “And what is that?”
The boy said: “Gather the people in one elevated place and tie me to the trunk of a tree; then take an arrow from my quiver and say: `In the Name of Allah, the Lord of the boy.’ If you do this, you will be able to kill me.”»
So he did this, and placing an arrow in the bow, he shot it, saying, “In the Name of Allah, the Lord of the boy.” The arrow hit the boy in the temple, and the boy placed his hand over the arrow wound and died.
The people proclaimed, “We believe in the Lord of the boy!” Then it was said to the king, “Do you see what has happened that which you feared has taken place. By Allah, all the people have believed (in the Lord of the boy).” So the king ordered that ditches be dug at the entrances to the roads and it was done, and fires were kindled in them. Then the king said: “Whoever abandons his religion, let him go, and whoever does not, throw him into the fire.”
The people were struggling and scuffling in the fire, until a woman and her baby whom she was breast-feeding came and it was as if she was being somewhat hesitant of falling into the fire, so her baby said to her: “Be patient mother! For verily, you are following the truth!”» (Ahmad).