The man in Egypt who bought him, said to his wife: "Make his stay (among us) honourable: may be he will bring us much good, or we shall adopt him as a son." Thus did We establish Joseph in the land, that We might teach him the interpretation of stories (and events). And Allah hath full power and control over His affairs; but most among mankind know it not. 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 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 And certainly she made for him, and he would have made for her, were it not that he had seen the manifest evidence of his Lord; thus (it was) that We might turn away from him evil and indecency, surely he was one of Our sincere servants. 24 They raced to the door and she tore his shirt from behind. And by the door, they met her husband whereupon she said: 'What is the recompense of one whose intent is evil against your people other than being imprisoned, or sternly punished' 25 Said he, 'It was she that solicited me'; and a witness of her folk bore witness, 'If his shirt has been torn from before then she has spoken truly, and he is one of the liars; 26 but if his shirt is torn from behind, she is lying and he is speaking the truth." 27 So when he saw his shirt rent from behind, he said: verily it is of the guile of ye women; verily the guile of ye women is mighty. 28 Joseph, turn away from this; and thou, woman, ask forgiveness of thy crime; surely thou art one of the sinners.' 29