The Egyptian who bought him said to his wife, "Lodge him honourably, he may prove of benefit to us, or we may even adopt him as our son." Thus We established Joseph in the land, so that We might teach him the true meaning of events. God has power over all things. However, most people do not know this. 21 And when he matured to his full strength, We bestowed him wisdom and knowledge; and this is how We reward the virtuous. 22 And it so happened that the lady in whose house Joseph was living, sought to tempt him to herself, and one day bolting the doors she said: "Come on now!" Joseph answered: "May Allah grant me refuge! My Lord has provided an honourable abode for me (so how can I do something so evil)? Such wrong-doers never prosper." 23 And indeed, she desired him, and he desired her; [and he would have succumbed] had he not seen [in this temptation] an evidence of his Sustainer's truth: thus [We willed it to be] in order that We might avert from him all evil and all deeds of abomination - for, behold, he was truly one of Our 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 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 Joseph, stay away from such affairs and you, woman, ask forgiveness for your sin; the guilt is yours." 29