The Egyptian who bought him said to his wife, "Lodge him honourably, he may prove of benefit to us, or we may even adopt him as our son." Thus We established Joseph in the land, so that We might teach him the true meaning of events. God has power over all things. However, most people do not know this. 21 When he reached the prime of life We gave him wisdom and knowledge. Thus We reward those who are good. 22 And she, in whose house he was, sought to seduce him. She closed the doors and said, "Come, you." He said, "[I seek] the refuge of Allah. Indeed, he is my master, who has made good my residence. Indeed, wrongdoers will not succeed." 23 She started towards him, and he would have succumbed to her, if he had not seen a sign from his Lord -- We did this in order to keep evil and indecency away from him, for he was truly one of Our chosen servants. 24 And they raced with one another to the door, and she tore his shirt from behind, and they met her lord and master at the door. She said: What shall be his reward, who wisheth evil to thy folk, save prison or a painful doom? 25 Joseph said, "It was she who sought to seduce me." One of her household testified, "If his shirt is torn at the front then she is speaking the truth, and he is lying. 26 but if his tunic has been torn from behind, then she is lying, and he is speaking the truth." 27 So when he saw his shirt,- that it was torn at the back,- (her husband) said: "Behold! It is a snare of you women! truly, mighty is your snare! 28 "O Joseph, pass this over! (O wife), ask forgiveness for thy sin, for truly thou hast been at fault!" 29