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 attained maturity, God gave him strength, wisdom and knowledge. Thus, do We reward those who do good. 22 However, the woman in whose house he lived, wanted to seduce him. One day she bolted the doors and said, "Come!" He replied, "God forbid! Truly [your husband] is my master and has treated me honourably. Wrongdoers certainly never prosper." 23 She desired him, had he not been shown the proof of his Lord he would have taken her. But We turned him away from evil and abomination, for he was one of Our sincere worshipers. 24 So they both raced each other to the door, and she tore his shirt from the back: they both found her lord near the door. She said: "What is the (fitting) punishment for one who formed an evil design against thy wife, but prison or a grievous chastisement?" 25 He said: "It was she that sought to seduce me - from my (true) self." And one of her household saw (this) and bore witness, (thus):- "If it be that his shirt is rent from the front, then is her tale true, and he is a liar! 26 but if it be that his shirt has been torn from behind, then she has lied, and he is one of the truthful.' 27 And when he saw his shirt torn at the back, he said: 'This is one of your (women's) guiles. Your guile, (O woman), is great indeed! 28 [But,] Joseph, let this pass! And thou, [O wife,] ask forgiveness for thy sin - for, verily, thou hast been greatly at fault!" 29