He that bought him, being of Egypt, said to his wife, 'Give him goodly lodging, and it may be that he will profit us, or we may take him for our own son.' So We established Joseph in the land, and that We might teach him the interpretation of tales. God prevails in His purpose, but most men know not. 21 And when he reached maturity, We bestowed on him right judgement and knowledge. Thus We reward those who do good. 22 And the woman in whose house he was, allured him not to restrain himself and she closed all the doors – and said, “Come! It is you I address!”; he said, “(I seek) The refuge of Allah – indeed the governor is my master – he treats me well; undoubtedly the unjust never prosper.” 23 And (with passion) did she desire him, and he would have desired her, but that he saw the evidence of his Lord: thus (did We order) that We might turn away from him (all) evil and shameful deeds: for he was one of Our servants, sincere and purified. 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 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 "But if it be that his shirt is torn from the back, then is she the liar, and he is telling the truth!" 27 So when her husband saw his shirt torn from the back, he said, "Indeed, it is of the women's plan. Indeed, your plan is great. 28 Joseph, turn away from this; and thou, woman, ask forgiveness of thy crime; surely thou art one of the sinners.' 29