At the time of Sultan Mahmud of Ghazna there lived a young man by the name of Haidar Ali Jan. His father, Iskandar Khan, decided to obtain for him the patronage of the Sultan, and he sent him to study spiritual matters under the greatest sages of the time.
When Haidar Ali had mastered the repetitions, exercises, recitals, and the bodily postures of the Sufi schools, he was taken by his father into the presence of the Sultan. “Mighty Mahmud,” said Iskandar, “I have had this youth, my eldest and most intelligent son, specially trained in the ways of the Sufis, so that he might obtain a worthy position at your Majesty’s court, knowing that you are the patron of learning of our epoch.”
Mahmud did not look up, but he merely said, “Bring him back in a year.” Slightly disappointed, but nursing high hopes, Iskandar sent Haidar Ali to study the works of the great Sufis of the past, and to visit the shrines of the ancient masters in Baghdad, so that the intervening time would not be wasted.
When he brought the youth back to the court, he said, “Peacock of the Age! My son has carried out long and difficult journeys, and at the same time to his knowledge of exercises he has added a complete familiarity with the classics of the People of the Path. Pray have him examined , so that it may be shown that he could be an adornment of your Majesty’s court.”
“Let him,” said Mahmud immediately, “return after another year.” During the next twelve months, Haidar Ali crossed the Amu Darya river and visited Bukhara and Samarqand, Qasr-i-Arifin and Tashkent, Dushambe and the turbats of the Sufi saints of Turkestan.
When he returned to the court, Mahmud of Ghazna took one look at him and said, “He may care to come back after a further year.” Haidar Ali made the pilgrimage to Mecca in that year. He travelled to India, and in Persia he consulted rare books and never missed an opportunity of
seeking out and paying his respects to the great dervishes of the time.
When he returned to Ghazna, Mahmud said to him, “Now select a teacher, if he will have you, and come back in a year.” When that year was over and Iskandar Khan prepared to take his son to the court, Haidar Ali showed no interest at all in going there. He simply sat at the feet of his teacher in Herat, and nothing that his father could say would move him. “I have wasted my time and my money, and this young man has failed the tests imposed by Mahmud the King ,” he lamented, and he abandoned the whole affair.
Meanwhile, the day when the youth was due to present himself came and went, and then Mahmud said to his courtiers, “Prepare yourselves for a visit to Herat, there is someone there whom I have to see,” As the Sultan’s horse-drawn carriages entered Herat to the flourish of trumpets, Haidar Ali’s teacher took him by the hand and led him to the gate of the tekkia, where they waited. Shortly afterwards Mahmud and his courtier Ayaz, taking off their shoes, presented themselves at the sanctuary.
“Here, Mahmud,” said the Sufi sheikh, “is the man who was nothing while he was a visitor of kings, but who is now one who is visited by kings. Take him as your Sufi counselor, for he is ready.”