The Egyptian who bought him instructed his wife: "House him honourably. He may be of use to us. We may even adopt him as a son." So, We firmly established Joseph in the land, and taught him the interpretation of dreams. God dominated in his affairs, though most men do not know. 21 And when he had attained his maturity, We gave him wisdom and knowledge: and thus do We reward those who do good. 22 His master's wife then tried to seduce him. She locked the doors and said to him, "Come on." He said, "I seek refuge in God who has given me a good place of shelter. The unjust will certainly have no happiness." 23 And she certainly determined [to seduce] him, and he would have inclined to her had he not seen the proof of his Lord. And thus [it was] that We should avert from him evil and immorality. Indeed, he was 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 shirt is torn from behind, she is lying and he is speaking the truth." 27 So when he saw his shirt rent from behind, he said: Surely it is a guile of you women; surely your guile is great: 28 Joseph, stay away from such affairs and you, woman, ask forgiveness for your sin; the guilt is yours." 29