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 [Yusuf (Joseph)] attained his full manhood, We gave him wisdom and knowledge (the Prophethood), thus We reward the Muhsinun (doers of good - see V. 2:112). 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 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 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 Joseph said: "It is she who was trying to tempt me to herself." And a witness belonging to her own household testified (on grounds of circumstantial evidence): "If his shirt is torn from the front, then she is telling the truth and he is a liar. 26 But if his shirt is torn from behind, then she has lied, and he is truthful." 27 When he saw his shirt was torn from behind he said, 'This is of your women's guile; surely your guile is great. 28 O Yusuf! turn aside from this; and (O my wife)! ask forgiveness for your fault, surely you are one of the wrong-doers. 29