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 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, asked of him an evil act. She bolted the doors and said: Come! He said: I seek refuge in Allah! Lo! he is my lord, who hath treated me honourably. Lo! wrong-doers never prosper. 23 But the woman desired him, and he would have desired her but for the indication he received from his Lord. This was so that We may avert both evil and lechery from him, for he was one of Our chosen devotees. 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 is torn from behind, then the woman is a liar and he is truthful.” 27 When he saw his shirt was torn from behind he said, 'This is of your women's guile; surely your guile is great. 28 Joseph, disregard this. And you - woman - ask forgiveness for your sin, for indeed it is you who has been at fault." 29