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 when Joseph reached maturity, We gave him judgment and knowledge. And thus We reward the doers of good. 22 His master's wife then tried to seduce him. She locked the doors and said to him, "Come on." He said, "I seek refuge in God who has given me a good place of shelter. The unjust will certainly have no happiness." 23 And she advanced towards him, and had Joseph not perceived a sign from his Lord he too would have advanced towards her. Thus was Joseph shown a sign from his Lord that We might avert from him all evil and indecency, for indeed he was one of Our chosen servants. 24 They both ran to the door and, in the struggle, she tore his shirt at the back. They found her husband at the door. She cried, "Shall not the man who wished to violate your wife be thrown into prison or sternly punished?" 25 He said: it is she who solicited me against myself. And a witness from her own household bare witness: if his shirt be rent in front, then she speaketh the truth and he is of the liars. 26 And if his shirt be rent from behind, then she lieth, and he is of the truth-tellers. 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 O Yusuf! turn aside from this; and (O my wife)! ask forgiveness for your fault, surely you are one of the wrong-doers. 29