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 When he reached the prime of life We gave him wisdom and knowledge. Thus We reward those who are good. 22 But she in whose house he was, sought to seduce him from his (true) self: she fastened the doors, and said: "Now come, thou (dear one)!" He said: "Allah forbid! truly (thy husband) is my lord! he made my sojourn agreeable! truly to no good come those who do wrong!" 23 She verily desired him, and he would have desired her if it had not been that he saw the argument of his Lord. Thus it was, that We might ward off from him evil and lewdness. Lo! he was of Our chosen slaves. 24 And they both rushed to the door; and she [grasped and] rent his tunic from behind - and [lo!] they met her lord at the door! Said she: "What ought to be the punishment of one who had evil designs on [the virtue of] thy wife - [what] but imprisonment or a [yet more] grievous chastisement?" 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 his tunic has been torn from behind, then she is lying, and he is speaking the truth." 27 So when he saw his shirt rent from behind, he said: Surely it is a guile of you women; surely your guile is great: 28 Joseph, stay away from such affairs and you, woman, ask forgiveness for your sin; the guilt is yours." 29