Sultan Mahmud of Ghazna went hunting one day. He picked up the tracks of a deer. For many hours he rode in pursuit. At length they reached a riverbed, where the deer turned round and looked at Sultan Mahmud as if to say: "Did you come into this world for the purpose of shooting game?'' Hearing this, the ruler gave up chasing the deer. He was sweating blood as he entered a nearby village. The first person he met was a ten-year old boy, to whom he called: "Get me a glass of water, son!" The boy said: "Uncle, my father has gone to fetch water. He will be back soon. Stop and rest here a while." The ruler dismounted. The boy made him sit in a spot sheltered from the wind, then took his horse and walked it up and down a few times. The ruler and his horse were both sweating profusely, but when their weariness had worn off a little, the boy went indoors and brought out a jug of water. "Hey!" said the Sultan, "I thought you told me there was no water here. Didn't you say your father had gone to fetch some?"
"I told you the truth," the boy replied. "My father did go to fetch water. He'll be along any moment now. If I had given you water as soon as you asked for it, however, when you were in such a state of perspiration, you might have made yourself sick. You were too hot to think of that at the time. But now you have cooled off, so I brought you some water. See, my father is coming from the fountain. You may have all the water you desire.'' At that moment, the Sultan's ministers and hunting companions reached the village and found their master there. The Sultan was amazed at the wisdom of this village lad. He asked him his name and learned that he was called Ayaz. This shabbily dressed child was like a ruin containing buried. treasure. The Sultan had stumbled upon this hidden treasure. Then Ayaz's father arrived, carrying a water container, and the Sultan revealed his identity to them both, saying: "I am your Sultan." Turning to the father, he said: "You shall give this boy to me. I intend to educate him and make him my intimate companion." Ayaz's father responded by saying: "My Lord, this is your Kingdom and we are your servants. For your sake I am ready to sacrifice my own life, my children and all that I possess.''
The Sultan then turned to Ayaz and said: "Come, ride with me. There is no need for you to bring anything with you." He mounted his horse and seated Ayaz behind him, but just as they were about to ride off, the boy cried: "Your pardon, sire! Please allow me to take a few things that are very precious to me." "Very well," said the Sultan. "Go and fetch them quickly!" Ayaz popped into the shack, emerged with a bundle in his hand and got back on the horse. Then they rode off together to the Sultan's palace.
In the palace, Ayaz had to devote part of each day to his studies. He also spent time in the company of the Sultan, whose favor he continued to earn. Each day that passed left the Sultan more impressed by the development of Ayaz's intelligence and wisdom. He came to be appreciated more and more by his royal master. This did not escape the notice of certain envious people, who began to plot against Ayaz. The Sultan had even entrusted to Ayaz the key to his inner treasury, and this new appointment really made them mad with envy. Wondering how they might cause Ayaz to fall from favor in the Sultan's eyes, they decided to bring some trumped up charge against him. Eventually, they started to spread the word that Ayaz had stolen from the inner treasury. The Sultan was very distressed when these rumors reached his ears. How could this possibly be? Realizing that these slanderous accusations, if allowed to circulate unchecked, could do more damage to Ayaz's honor than the real thing, the Sultan summoned the envious courtiers and asked them what proof they had to show that Ayaz was a thief. "But sire," they said, "Ayaz is the only one in the palace to keep his door locked. Not once since he first came here has he taken anybody into his room. He has never left his door open. It is obvious he must be hiding something wrong.'' They then revealed their true colors when they went on to say: "Now you have entrusted him with the key to the inner treasury, which contains innumerable precious stones and other valuables. He must be stealing jewels from there and hiding them in his room. Why else would he always keep his door locked and never let anybody in?"
Sultan Mahmud was on the horns of a dilemma. If he did not speak out, bad things would continue to be said about someone very dear to him. This he could not tolerate. But Ayaz would be offended if he ordered a search of his room. In the end, however, the second course seemed the lesser of two evils. He therefore decided to put a stop to the envious rumors by having Ayaz's room searched. He would make it up with him later. In any case, Ayaz loved him enough to tolerate his injustice. One day when Ayaz was away from the palace, the Sultan summoned the envious courtiers, saying: "Go ahead and search his room! You can keep anything you find belonging to the treasury!" They broke open the door to Ayaz's room and the envious courtiers trampled one another in a rush to get inside. They found an old mat and a sheepskin rug on the floor, while on the wall there hung a shepherd's crook, a cape and a pair of sandals. "He must have buried it!" they exclaimed, pulling up the floor boards; but they failed to find a single thing belonging to the treasury. Out they came, flushed with shame and disgrace. At least their blushes betrayed a touch of humility, a trace of humanity within them. There are some who would not be at all dismayed under such circumstances.
When Ayaz returned to the palace, he was surprised to see that his door had been forced open and the contents of his room turned upside down. But he declared himself satisfied as soon as they told him this had been done on the Sultan's orders. Mahmud received Ayaz into his presence and apologized to him. ''Ayaz,'' he said, "by breaking down your door, I put a stop to their malicious envy of you. If I had not forced your door, they would never have held their wagging tongues." Ayaz responded to this by saying: "Sire, it is right and proper for Allah to test His servants, the sultan his slave, the Sheikh his disciple and the teacher his pupil. It is insolent impertinence for the servant to presume to test Allah, the slave his sultan, the pupil his teacher or the disciple his Sheikh. Break down the door, not of my room, but of my heart and search inside; you will fail to find anything but affection for you, leaving no space to stow jewels or worldly goods."
"Ayaz," said the Sultan, "let me ask you something. It seems you kept a shepherd's crook, sandals and a cape, hanging on your wall. What is the significance of these?" Ayaz explained: "Sire, you know about them already. Before I came to serve in the palace, I used to be a shepherd in cape and sandals. Then my self-importance grew as you conferred more and more authority on me. I tried to correct this tendency by saying to myself each night: "Beware of becoming arrogant! You are a shepherd, the son of a shepherd! Do not forget this just because you have found favor with the Sultan! Look, there you see your sandals, cape and crook!"
From the Irsahd by Shaykh Muzzafer Ozak al Jerrahi