The Egyptian who bought him instructed his wife: "House him honourably. He may be of use to us. We may even adopt him as a son." So, We firmly established Joseph in the land, and taught him the interpretation of dreams. God dominated in his affairs, though most men do not know. 21 And And when he reached his prime We gave him wisdom and knowledge. Thus We reward the good. 22 And the woman in whose house he was, allured him not to restrain himself and she closed all the doors – and said, “Come! It is you I address!”; he said, “(I seek) The refuge of Allah – indeed the governor is my master – he treats me well; undoubtedly the unjust never prosper.” 23 But the woman desired him, and he would have desired her but for the indication he received from his Lord. This was so that We may avert both evil and lechery from him, for he was one of Our chosen devotees. 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 is torn from the back, then is she the liar, and he is telling the truth!" 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! Disregard this – and O woman! Seek forgiveness for your sin; indeed you are of the mistaken.” 29