It has been told, that during the reign of Sultan Mahmud of Ghazna, there lived a certain Haidar Ali Jan. His father, Iskandar Khan, wanted to gain the patronage of the Sultan, so he sent Haidar Ali away to study spirituality under the guidance of a well known sage.
After Haidar Ali had mastered various exercises and spiritual recitals, taught in the Sufi schools, his father took him before Sultan Mahmud.
"Mighty Sultan Mahmud," said Iskandar Khan, "I have had my eldest and most intelligent son specially trained in the ways of the Sufi, so that he might be given a good position in your court, knowing that you are a patron of learning!"
Sultan Mahmud did not look up, but just said, "Bring him back in a year!"
Slightly disappointed, but maintaining high hopes, Iskandar Khan sent Haidar Ali to study the works of the great Sufis of the past and to visit the shrines of the ancient masters, so that he would be better prepared the following year.
The next year, when he took Haidar Ali back to Sultan Mahmud's court, he said, "Your Majesty, my son has covered long and difficult journeys and is now more knowledgeable in Sufi history and classical spiritual exercises. Please have him tested, so it can be proven that he will be a wonderful asset to your court."
"Let him," said Sultan Mahmud without hesitation, "return after another year!"
Over 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, Sultan Mahmud of Ghazna took one look at him and said, "He may care to come back after a year!"
Haidar Ali made the pilgrimage to Mecca that year. He then traveled to India and in Persia he consulted rare books and never missed an opportunity to seek out and pay his respects to the great dervishes of the time.
When he returned to Ghazna, Sultan Mahmud said to him, "Now select a sheikh (teacher) if he will have you, and come back in a year!"
Another year was over and Iskandar Khan prepared to take his son to the court, however, this time Haidar Ali showed no interest in going before the Sultan. He sat at the feet of his sheikh in Herat and nothing that his father could say would move him.
"I have wasted my time and money, and my son has failed the tests imposed by Sultan Mahmud," Iskandar Khan cried to his family and friends. He decided to abandoned his great plans for Haidar Ali and left him alone with his sheikh.
The day preset day for Haidar Ali to present himself at the court came and went. Sultan Mahmud said to his courtiers, "Prepare for a journey to Herat, for there is someone in that city I have to meet."
When Sultan Mahmud's entourage entered Herat to the sound of drums and trumpets, Haidar Ali and his sheikh were sitting in a garden sanctuary near by. Sultan Mahmud and his courtier Ayaz, approached the sanctuary and took off their shoes in respect.
"Welcome, Sultan Mahmud," said the Sufi sheikh, and he pointed to Haidar Ali and said, "Here is the man who was nothing while he was a visitor at your court, but now, he is worthy of a visit from a king. Take him as your Sufi counselor, for he is ready!"
Note: This is a true story from the life and studies of Hiravi also called, Haidar Ali Jan, the Sage of Herat!