The Egyptian that bought him said to his wife: 'Make his stay honorable. He may benefit us, or take him for our son' As such We established Joseph in the land, so that We might teach him the interpretation of visions. Allah prevails in His affairs, though most people do not know. 21 And when Joseph reached maturity, We gave him judgment and knowledge. And thus We reward the doers of good. 22 And she, in whose house he was, sought to seduce him (to do an evil act), she closed the doors and said: "Come on, O you." He said: "I seek refuge in Allah (or Allah forbid)! Truly, he (your husband) is my master! He made my stay agreeable! (So I will never betray him). Verily, the Zalimun (wrong and evil-doers) will never be successful." 23 And indeed, she desired him, and he desired her; [and he would have succumbed] had he not seen [in this temptation] an evidence of his Sustainer's truth: thus [We willed it to be] in order that We might avert from him all evil and all deeds of abomination - for, behold, he was truly one of Our servants. 24 And the twain raced to the door, and she rent his shirt from behind, and the twain met her master at the door. She said: What is the meed of him who intended evil toward thy household except that he be imprisoned, or a torment afflictive? 25 (Joseph) said: She it was who asked of me an evil act. And a witness of her own folk testified: If his shirt is torn from before, then she speaketh truth and he is of the liars. 26 "But if it be that his shirt is torn from the back, then is she the liar, and he is telling the truth!" 27 So when the governor saw his shirt torn from behind, he said, “Indeed this is a deception of women; undoubtedly the deception of women is very great.” 28 Joseph, turn away from this; and thou, woman, ask forgiveness of thy crime; surely thou art one of the sinners.' 29