sulatn mahmood and ayaj

Sultan Mahmood Ghaznavi and slave Ayaz -A Wonderful story illustrating Ubudiyah


Today the story I am going to narrate you  may change your life forever . The story is that of a slave Ayaz who knew the meaning of Ubudiyah. And do you know what Ubudiyah is ?

Al-Ubudiyyah comprises the servitude and slavery of the heart, tongue and limbs to Allah (SWT). The slavery of the heart includes both the Qawl (saying of the heart) and Amal (actions of the heart). So, Al-Ubudiyyah is a comprehensive term that asserts the meaning of the ayah:

“You Alone do we worship and You Alone do we seek for Help.” Noble Qur’an (1:5)

So, there was a Slave Ayaz who was very loyal to his master . His owner was a wealthy merchant .

Quran ad

Read Other story

For some reasons , the wealthy merchant became bankrupt. He had to sell all his belongings until he had nothing left except his slave Ayaz and he had huge debt too. Slave Ayaz suggested a solution to this problem .He told his owner ,” Take me to the slave market and sell me for a very high price.” His master said, “My debt is huge then your value . It is not a solution because nobody will  buy you for such a high price. ”

But Ayaz insisted his master to sell him for a price of one million dirhams . His master refused by saying nobody will buy you for one million dirhams ,Ayaz . But again Ayaz insisted his master to sell him for a price of one million dirhams  stating to sell him mentioning that he had some special quality in him which other slaves in the market don’t have. His master said, I know that you are not young, strong or handsome what special quality should I state? Ayaz said , “Tell your buyers that Ayaz knows how to be a slave .He knows what the meaning of Ubudiyah is.

The owner of Ayaz thought for a while and said , “It is worth a try. ” He took Ayaz to the slave market and announced that he is selling Ayaz for one million dirhams. Everyone started to  laugh at him because in those days a slave was not worth more that 200-300 dirhams. It was something new so everyone started talking about it and the news reached the palace of Sultan Mahmud of Ghazni.

Sultan Mahmud of Ghazni or Mahmood Ghaznawi, was the most prominent Persian ruler at that time, who turned the former provincial city of Ghazni into the wealthy capital of an extensive empire which extended from most of today’s Iran, Afghanistan as well as Pakistan and regions of North-West India.

Curiosity of Sultan Mahmood Ghaznawi grew strong .  He asked Ayaz and his owner to be presented before him. Sultan Mahmood Ghaznawi asked the owner of Ayaz,” Why are you selling this slave for such a staggering higher price?” He replied,”This is because Ayaz know how to be a slave and  he knows the meaning of Ubudiyah.” Sultan Mahmood Ghaznawi was impressed with his answer and purchased slave Ayaz by paying one million dirhams.

Once the owner of slave Ayaz left the palace with his money, Sultan Mahmood Ghaznawi, ordered his guards to whip the slave Ayaz 100 lashes. While these lashes were going on, Sultan Mahmood Ghaznawi suggested one of his wazir to go to slave Ayaz and whisper in his ear to plead to Sultan Mahmood Ghaznawi to stop the whip.  He whispered in Ayaz’s ear to tell Sultan, “O Sultan, why are you whipping me because I have not done anything wrong?”

Slave Ayaz replied to this wajir that, he couldn’t do that because Sultan was his master and he was happy with whatever his master did with him.

When Sultan Mahmood Ghaznawi heard the answer of his slave Ayaz from his Vizier, he said, If that is his answer then I really brought him at very cheap price.

Sultan Mahmood Ghaznawi was pleased with his slave Ayaz answer .He asked Ayaz, “Oh Ayaz , what type of food would you like to eat and what type of cloths would like to wear? “Ayaz replied whatever my master gives me as food I will eat it and whatever my master give me the cloths I will wear it.

Sultan Mahmood Ghaznawi began to love the qualities of his slave Ayaz so much that he made this slave Ayaz a  chief Vizier or chief Minister of his court.

It is written in the book “Adad ussin” that when Ayaz became a close confidante of Sultan Mahmud Ghaznavi, the powerful Muslim ruler, his detractors began to try to pull him down from this position.

One day two of the ministers came to Sultan Mahmud Ghaznavi and said, “Ayaz has stolen a lot of ornaments and treasure and he has kept all of them in a room which he has locked. Every morning he visits that room and does not allow anyone else.”

Thereupon hearing this, Sultan Mahmud Ghaznavi fell into doubt and ordered that  when Ayaz comes to me tomorrow ,open the door and bring here whatever he has stored in that room.

The next morning these people took tools and broke the lock of the door and stepped into the room of Ayaz. They, however, did not find anything except a cotton sheet and a pair of old leather slippers. They thought that the treasure must be buried underground otherwise what was the need for him to visit this room everyday if it contained only a torn sheet and old leather slippers.

They dug the floor of the room but did not find anything. They informed the ruler and he asked Ayaz that except for a cotton sheet and a pair of leather slippers there was nothing else in the room. So, why did he keep the room locked and pay a private visit everyday?the People wondered.

Ayaz was summoned and asked the reason .He said, “Before I became your slave I had worn that particular garb. But after joining your service I got everything. Since man is prone to disobedience and pride, I frequently visit the room and see my old dress so that I may not fall into vanity. I should always remember that whatever I have today is due to the favour of Sultan and it is all given to me as a loan. After that I begin my job of the day.”

Ayaz was also heard saying his prayer with all sincerity, “O Lord! This ministry is – Yours and not mine. These ministerial robes are yours and not mine. The strength in the body, light in the eye and what not are all due to you”. He was all this time shedding tears of love in complete submission to Allah (SWT).

After hearing the above words of Ayaz, Sultan Mahmud Ghaznavi was highly  impressed with his dedications. He embraced Ayaz and said , ‘What a lesson you have given me, Ayaz! It is this lesson which we all must learn, whatever be our position. Because before Allah (SWT) and in whose presence we all are but slaves, nothing should make us forget that helplessness through which we were reared and raised, and brought to life, to understand and to live a life of joy.’

Dr. Allama Mohammed Iqbal, praises Islam and its teaching of equality between different class of people in the following Urdu couplet by looking at the example of Sultan Mahmood Ghaznavi and slave Ayaz:

Ek Hi Saf Mein Khade Ho Gaye Mahmood-O-Ayaz,
Na Koi Banda Raha Aur Na Koi Banda Nawaz.
Banda-O-Saheb-O-Muhtaaj-O-Ghani Ek Huwe,
Teri Sarkar Mein Pahunche Toh Sabhi Ek Huwe.

So the first condition of success is to fill our heart with Divine Light. Filling our heart with Divine Light means dedication or surrender – renouncing everything to Allah (SWT).

On another occasions all the ministers approached Sultan Mahmood Ghaznawi and complain why was Ayaz appointed as a chief minister, They said that Ayaz had no qualification or required experience to perform the Job of chief minister. It is they who were with Sultan since a  long time and it is they who had all the required qualification and experience to perform the job of chief minister and not Ayaz .

Sultan Mahmood Ghaznawi said,” Do you want me to prove that Ayaz is more worthy for the post of chief minister than all of you combined?” They said” yes ! Prove to us that Ayaz is best suitable for the post of chief minister, so that we should not have any complaints in future against him.”

Sultan said ” All of you come to my court tomorrow and I will prove  you that Ayaz is most deserving person for the position of chief minister.” Next day all the ministers came. Sultan Mahmood Ghaznawi was seated on his throne and a very expensive huge Gem was kept infront of him. Sultan Mahmood Ghaznawi called the first minister and asked him to take a very closer look of the Gem and asked him to give the value of the Gem. The Minister after careful examination told Sultan Mahmood Ghaznawi that it was very expensive and might cost around one million dirhams. Then Sultan Mahmood Ghaznawi asked, “What will be the value of this Gem if it broke?” The Minister replied that this Gem would be of  No value if it broke ! Sultan Mahmood Ghaznawi asked him to break the Gem stone to test him .The minister was hesitant to break the Gem stone because it was very expensive. This minister left the place without breaking the Gem stone.

Then Sultan Mahmood Ghaznawi called the second minister and asked him to take a very closer look of the Gem and asked him to give the price for the Gem. Second minister after examining the Gem told  Sultan Mahmood Ghaznawi that, it was very expensive It might cost around two million dirhams. Then Sultan Mahmood Ghaznawi asked him ,”what will be the value of this Gem if it broke?”The  Minister replied that it would have  no value if it breaks! To test this second minister Sultan Mahmood Ghaznawi ask him to break the Gem stone .The minister was hesitant to break the Gem stone, because it was very expensive. This second minister also left the place without breaking the Gem stone.

Finally Sultan Mahmood Ghaznawi called Ayaz and asked him the same questions .He told him to take a very closer look of the Gem and asked him to give the price for the Gem. Ayaz after examining the Gem told Sultan Mahmood Ghaznawi that it was very expensive Gem and gave the highest value then all the ministers. Then Sultan Mahmood Ghaznawi asked, “What will be the value of this Gem if it broke?” Ayaz replied that this Gem would be of no value if it breaks! To test Ayaz, Sultan Mahmood Ghaznawi asked him to break the Gem stone, Ayaz broke it very easily and without any hesitation. So Sultan Mahmood Ghaznawi said ,” Ayaz you broke such an expensive Gem stone.” For that Ayaz replied, “Your command to break is  of more value then the Gem stone itself.”

This is called total and complete surrender and obedience or Al-Ubudiyah, nothing is more valuable then pleasure of Allah (SWT).

We heard this story from one of our teachers . It moved us greatly . We learned the meaning of Ubudiyah  and we pray that Allah swt give us the taufeeq to apply it in our life and make us a better slave.

Allah Almighty (SWT) says in Noble Qur’an:

“And they control not for themselves any harm or profit, and they control not death nor life, nor raising (the dead) to life.” (Surah al-Furqan 25:3)

 When we do not understand something ,We should keep our reasoning aside and follow the commands of Allah swt because there are some ilm which is known only to Allah. We only know what he wants us to know .We are totally dependent on Allah swt .We are in need of his immense favor and mercy . May Allah forgive our shortcomings and accept us as a humble slave.

Read Our Motivational Muslim Series




This article is Originally written by Aafiya for If you like this, consider sharing it. Your single share means a lots to us.Republishing the article is permitted on the condition of proper attributes and link.

Do you want to get a Weekly magazine? You can subscribe to get a weekly email with our recent articles.

Follow us in our Social media Profiles: (facebook @islamhashtag), (instagram @islamhashtag ) and (pinterest @islamhashtag )

If you want to support our Quran Project, Become a member:


Islam Hashtag

The Author of this website is Fahmina Jawed(Aafiya), an Alimah graduate who believes in spreading the Pearls of Islam and offering guidance through her knowledge(ilm). She is an Optometry Doctor as well and she loves to read the books of the Pious Scholars.

Leave a Reply