The man from Egypt who bought him said to his wife: "Take good care of him, possibly he might be of benefit to us or we might adopt him as a son." Thus We found a way for Joseph to become established in that land and in order that We might teach him to comprehend the deeper meaning of things. Allah has full power to implement His design although most people do not know that. 21 When he reached the prime of life We gave him wisdom and knowledge. Thus We reward those who are good. 22 And she in whose house he was sought to make himself yield (to her), and she made fast the doors and said: Come forward. He said: I seek Allah's refuge, surely my Lord made good my abode: Surely the unjust do not prosper. 23 And assuredly she besought him, and he would have besought her were it not that he had seen the argument of his Lord. Thus We did, in order that We might avert from him all evil and indecency; verily he was of our bondmen single-hearted. 24 They raced to the door; and she tore his shirt from behind. They encountered her master by the door. She said, 'What is the recompense of him who purposes evil against thy folk, but that he should be imprisoned, or a painful chastisement?' 25 Joseph said, "It was she who sought to seduce me." One of her household testified, "If his shirt is torn at the front then she is speaking the truth, and he is lying. 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 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, ignore this. And, [my wife], ask forgiveness for your sin. Indeed, you were of the sinful." 29