The Egyptian that bought him said to his wife: 'Make his stay honorable. He may benefit us, or take him for our son' As such We established Joseph in the land, so that We might teach him the interpretation of visions. Allah prevails in His affairs, though most people do not know. 21 And when he had attained his maturity, We gave him wisdom and knowledge: and thus do We reward those who do good. 22 Now the woman in whose house he was solicited him, and closed the doors on them. 'Come,' she said, 'take me!' 'God be my refuge,' he said. 'Surely my lord has given me a goodly lodging. Surely the evildoers do not prosper. 23 For she desired him; and he would have taken her, but that he saw the proof of his Lord. So was it, that We might turn away from him evil and abomination; he was one of Our devoted servants. 24 Both of them raced to the door, and she (grabbed and) rent his shirt from behind. They met her lord outside the door. "There is no other penalty for a man," said she, "who wanted to outrage your wife but imprisonment or grievous punishment." 25 Said he, 'It was she that solicited me'; and a witness of her folk bore witness, 'If his shirt has been torn from before then she has spoken truly, and he is one of the liars; 26 And if his shirt is rent from behind, she tells a lie and he is one of the truthful. 27 So when he saw his shirt torn from behind, he said: Lo! this is of the guile of you women. Lo! the guile of you is very 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