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, solicited him against himself; and she fastened the doors, and said: come on, O thou! He said: Allah be my refuge: verily he is my lord; he hath made me a goodly dwelling; verily the wrong-doers fare not well. 23 She started towards him, and he would have succumbed to her, if he had not seen a sign from his Lord -- We did this in order to keep evil and indecency away from him, for he was truly one 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 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 has been torn from behind, then she has lied, and he is one of the truthful.' 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 O Joseph! Turn away from this, and thou, (O woman), ask forgiveness for thy sin. Lo! thou art of the faulty. 29