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 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 make himself yield (to her), and she made fast the doors and said: Come forward. He said: I seek Allah's refuge, surely my Lord made good my abode: Surely the unjust do not prosper. 23 For she desired him; and he would have taken her, but that he saw the proof of his Lord. So was it, that We might turn away from him evil and abomination; he was one of Our devoted 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, "It was she who sought to seduce me." And a witness from her family testified. "If his shirt is torn from the front, then she has told the truth, and he is of the liars. 26 And if his shirt is rent from behind, she tells a lie and he is one of the truthful. 27 And when he saw his shirt torn at the back, he said: 'This is one of your (women's) guiles. Your guile, (O woman), is great indeed! 28 "O Yusuf (Joseph)! Turn away from this! (O woman!) Ask forgiveness for your sin. Verily, you were of the sinful." 29