The Egyptian who bought him said to his wife, "Be kind to him, perhaps he will be of some benefit to us or we may adopt him." Thus, We settled Joseph in the land so that We could teach him the interpretation of dreams. God has full control over His affairs but most people 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 And [it so happened that] she in whose house he was living [conceived a passion for him and] sought to make him yield himself unto her; and she bolted the doors and said, "Come thou unto me!" [But Joseph] answered: "May God preserve me! Behold, goodly has my master made my stay [in this house]! Verily, to no good end come they that do [such] wrong!" 23 She desired him, had he not been shown the proof of his Lord he would have taken her. But We turned him away from evil and abomination, for he was one of Our sincere worshipers. 24 Both of them raced to the door, and she (grabbed and) rent his shirt from behind. They met her lord outside the door. "There is no other penalty for a man," said she, "who wanted to outrage your wife but imprisonment or grievous punishment." 25 He (Joseph) said: 'It was she who sought to seduce me' and a witness (an infant) of her people bore witness, saying: 'If his shirt is torn from the front, she is speaking the truth and he is one of the liars, 26 And if his shirt be rent from behind, then she lieth, and he is of the truth-tellers. 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 Joseph, ignore this. And, [my wife], ask forgiveness for your sin. Indeed, you were of the sinful." 29