And the man from Egypt who bought him said to his wife: "Make his stay [with us] honourable; he may well be of use to us, or we may adopt him as a son. And thus We gave unto Joseph a firm place on earth; and [We did this] so that We might impart unto him some understanding of the inner meaning of happenings. For, God always prevails in whatever be His purpose: but most people know it not. 21 And when he was fully grown, We gave him judgment and knowledge. Even so We recompense the good-doers. 22 And she, in whose house he was, sought to seduce him. She closed the doors and said, "Come, you." He said, "[I seek] the refuge of Allah. Indeed, he is my master, who has made good my residence. Indeed, wrongdoers will not succeed." 23 She started towards him, and he would have succumbed to her, if he had not seen a sign from his Lord -- We did this in order to keep evil and indecency away from him, for he was truly one of Our chosen servants. 24 Then both of them rushed to the door, each seeking to get ahead of the other, and she tore Joseph's shirt from behind. Then both of them found the husband of the lady at the door. Seeing him she said: "What should be the punishment of him who has foul designs on your wife except that he should be imprisoned or subjected to painful chastisement?" 25 (Joseph) said: "It was she who wanted to seduce me." And a witness from her family testified: "If the shirt is torn from the front then the woman is speaking the truth, and he is a liar. 26 And if his shirt be rent from behind, then she lieth, and he is of the truth-tellers. 27 When the husband saw the shirt torn at the back, he said: "Surely this is a woman's ruse, and the wiles of women are great. 28 "O Yusuf (Joseph)! Turn away from this! (O woman!) Ask forgiveness for your sin. Verily, you were of the sinful." 29