The Egyptian that bought him said to his wife: 'Make his stay honorable. He may benefit us, or take him for our son' As such We established Joseph in the land, so that We might teach him the interpretation of visions. Allah prevails in His affairs, though most people do not know. 21 And when Joseph reached the age of maturity, We granted him judgement and knowledge. Thus do We reward those who do good. 22 But she in whose house he resided wished to seduce him and, closing the doors, said: "Come into me. "God forbid!" he said; "he is my master who has approved my stay. Surely those who act wrongly do not 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 They both ran to the door and, in the struggle, she tore his shirt at the back. They found her husband at the door. She cried, "Shall not the man who wished to violate your wife be thrown into prison or sternly punished?" 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 torn from behind, then the woman is a liar and he is truthful.” 27 When the master saw that Joseph's shirt was torn from behind, he told his wife, "This is some of your womanly guile in which you are certainly skillful. 28 "O Yusuf (Joseph)! Turn away from this! (O woman!) Ask forgiveness for your sin. Verily, you were of the sinful." 29