And the man from Egypt who bought him said to his wife: "Make his stay [with us] honourable; he may well be of use to us, or we may adopt him as a son. And thus We gave unto Joseph a firm place on earth; and [We did this] so that We might impart unto him some understanding of the inner meaning of happenings. For, God always prevails in whatever be His purpose: but most people know it not. 21 And when he had attained his maturity, We gave him wisdom and knowledge: and thus do We reward those who do good. 22 And she in whose house he was sought to make himself yield (to her), and she made fast the doors and said: Come forward. He said: I seek Allah's refuge, surely my Lord made good my abode: Surely the unjust do not prosper. 23 And indeed the woman desired him; and he too would have desired her were he not to witness the sign of his Lord*; this is what We did, to turn away evil and lewdness from him; indeed He is one of Our chosen bondmen. (* Allah saved him and he never desired this immorality.) 24 And they both hastened to the door, and she rent his shirt from behind and they met her husband at the door. She said: What is the punishment of him who intends evil to your wife except imprisonment or a painful chastisement? 25 Joseph said, "It was she who tried to seduce me." Someone from the household in confirmation of Joseph's statement said, "If his shirt it torn from the front, she has spoken the truth and he is lying, 26 “And if his shirt is torn from behind, then the woman is a liar and he is truthful.” 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