Acts 7.9. Now Joseph was taken down to Egypt, and Poti-phar, an officer of Pharaoh, the captain of the guard, an Egyptian, bought him from the Ishmaelites who had brought him down there. 2The Lord was with Joseph, and he became a successful man; and he was in the house of his master the Egyptian, 3and his master saw that the Lord was with him, and that the Lord caused all that he did to prosper in his hands. 4So Joseph found favor in his sight and attended him, and he made him overseer of his house and put him in charge of all that he had. 5From the time that he made him overseer in his house and over all that he had the Lord blessed the Egyptian's house for Joseph's sake; the blessing of the Lord was upon all that he had, in house and field. 6So he left all that he had in Joseph's charge; and having him he had no concern for anything but the food which he ate.
Now Joseph was handsome and good-looking. 7And after a time his master's wife cast her eyes upon Joseph, and said, “Lie with me.” 8But he refused and said to his master's wife, “Lo, having me my master has no concern about anything in the house, and he has put everything that he has in my hand; 9he is not greater in this house than I am; nor has he kept back anything from me except yourself, because you are his wife; how then can I do this great wickedness, and sin against God?” 10And although she spoke to Joseph day after day, he would not listen to her, to lie with her or to be with her. 11But one day, when he went into the house to do his work and none of the men of the house was there in the house, 12she caught him by his garment, saying, “Lie with me.” But he left his garment in her hand, and fled and got out of the house. 13And when she saw that he had left his garment in her hand, and had fled out of the house, 14she called to the men of her household and said to them, “See, he has brought among us a Hebrew to insult us; he came in to me to lie with me, and I cried out with a loud voice; 15and when he heard that I lifted up my voice and cried, he left his garment with me, and fled and got out of the house.” 16Then she laid up his garment by her until his master came home, 17and she told him the same story, saying, “The Hebrew servant, whom you have brought among us, came in to me to insult me; 18but as soon as I lifted up my voice and cried, he left his garment with me, and fled out of the house.”
19When his master heard the words which his wife spoke to him, “This is the way your servant treated me,” his anger was kindled. 20And Joseph's master took him and put him into the prison, the place where the king's prisoners were confined, and he was there in prison. 21But the Lord was with Joseph and showed him steadfast love, and gave him favor in the sight of the keeper of the prison. 22And the keeper of the prison committed to Joseph's care all the prisoners who were in the prison; and whatever was done there, he was the doer of it; 23the keeper of the prison paid no heed to anything that was in Joseph's care, because the Lord was with him; and whatever he did, the Lord made it prosper.