When the brothers of Sayyiduna Yusuf علیہ السلام threw him inside the well, a person called Maalik Bin Za’ar, who lived in Madyan, reached that well with a caravan. He lowered down his bucket into the well. Sayyiduna Yusuf علیہ السلام held the bucket in his blessed hands and thus Maalik Bin Za’ar took him out from the well. Then the brothers of Sayyiduna Yusuf علیہ السلام said to the rescuer that he (Sayyiduna Yusuf علیہ السلام ) is their fugitive slave. If you buy him, we will sell him to you in a very cheap price. Therefore the brothers sold Sayyiduna Yusuf علیہ السلام in exchange of twenty dirham only and bounded the purchaser with the condition to take him so far away from them that they could not even get to hear about him. Maalik Bin Za’ar purchased him and moved towards the market of Egypt and announced selling Sayyiduna Yusuf علیہ السلام in the market. In those days, the king of Egypt was Riyan Bin Waleed ‘Amleeqi. He had handed over his government and treasury to his prime minister Qatfeer Misri. In Egypt, the people used to call him with the title of ‘Azeez of Egypt’.
When the ‘Azeez of Egypt came to know that a very handsome slave has been brought in the Egyptian market for sale and people have gathered in the market with huge amount of money in order to buy him; ‘Azeez of Egypt purchased Sayyiduna Yusuf علیہ السلام by paying an amount of gold, silver, musk, and silk equivalent to the weight of Sayyiduna Yusuf علیہ السلام . ‘Azeez of Egypt took Sayyiduna Yusuf علیہ السلام home and said to his wife, Zulaykha to treat this slave with great respect and honour. At that time, Sayyiduna Yusuf علیہ السلام was thirteen or seventeen years old. Zulaykha allured by the beauty of Sayyiduna Yusuf علیہ السلام .
One day, after adorning herself elegantly with jewellery, she shut all the doors and tried to seduce Sayyiduna Yusuf علیہ السلام . After imploring help from the court of Allah , Sayyiduna Yusuf علیہ السلام said that he could never do wrong with his master, ‘Azeez of Egypt and could never be dishonest to him by betraying his favours. However, when Zulaykha scooted towards him, he علیہ السلام ran away. Zulaykha held his shirt from behind which tore away. Zulaykha chased him up to the main door. Coincidently, ‘Azeez of Egypt entered the home right at that time and saw them both running. After seeing her husband, she said that the slave should be punished because he had an evil intention towards his wife.
Sayyiduna Yusuf علیہ السلام said, ‘O ‘Azeez of Egypt, she is telling lie. She herself tried to seduce me and I ran to escape from her and then she chased me.’
After listening to the accounts of both, ‘Azeez was shocked and said, ‘O Yusuf (علیہ السلام ), how can I believe that you are telling the truth?’ Sayyiduna Yusuf علیہ السلام said, ‘Inside the home, there is a four months baby lying in the cradle who is the son of the maternal uncle of Zulaykha. Ask him what the truth is.’ The ‘Azeez of Egypt said that how can a four months baby speak and bear witness! Sayyiduna Yusuf علیہ السلام said that Allah will bless him to prove my truth because I am innocent. Therefore, when ‘Azeez of Egypt asked the baby, the baby replied in a loud and clear voice that:
Testified; if his shirt is torn from the front, then the woman is truthful and he has spoken incorrectly. And if his shirt is torn from behind, then the woman is a liar and he is truthful.
[Kanz-ul-Iman (Translation of Quran)] (Part 26, Surah Yusuf, verse 26-27)
After listening to the witness from the baby, when ‘Azeez of Egypt looked at the shirt of Sayyiduna Yusuf علیہ السلام , it was torn from behind. At that time, whilst declaring the innocence of Sayyiduna Yusuf علیہ السلام , he said the following words:
Indeed this is a deception of women; undoubtedly your deception (O women) is very excessive. O Yusuf! Disregard this – and O woman!
Seek forgiveness for your sin; indeed you are of the wrongdoers. [Kanz-ul-Iman (Translation of Quran)] (Part 12, Surah Yusuf, verse 28-29)