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 his maturity We vouchsafed unto him judgement and knowledge; and Thus We recompense the well-doers. 22 And she, in whose house he was, sought to seduce him and closed the doors saying: 'Come' 'In Allah is my refuge' he replied. 'My Lord has made my dwelling a good one. Harmdoers never prosper' 23 And she certainly determined [to seduce] him, and he would have inclined to her had he not seen the proof of his Lord. And thus [it was] that We should avert from him evil and immorality. Indeed, he was of Our chosen servants. 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 So when the governor saw his shirt torn from behind, he said, “Indeed this is a deception of women; undoubtedly the deception of women is very great.” 28 O Joseph! Turn away from this, and thou, (O woman), ask forgiveness for thy sin. Lo! thou art of the faulty. 29