Joseph was taken down to Egypt, and Potiphar, an Egyptian, one of Pharaoh's officers, the captain of the guard, bought him from the Ishmaelites.
Now the LORD was with Joseph, so that he prospered; and he was in the house of his master, the Egyptian. When his master saw that the LORD was with him and made everything succeed that he undertook, he trusted him and made him his own servant. He also made him overseer of his household and placed all that he had in his care. From the time that he made him overseer in his house and over all that he had, the LORD blessed the Egyptian's household for Joseph's sake, and the blessing of the LORD was upon all that he had in the house and in the field. Potiphar left all that he had in Joseph's charge, and he knew nothing about his affairs except about the food which he ate. And Joseph was handsome and attractive.
After these honors had come to Joseph, his master's wife tried to tempt him to be unfaithful to his trust. But he refused, saying to her, "See, my master knows nothing about what I do in the house, and he has put all that he has in my charge. How then can I do this great wrong and sin against God?" Day after day she tempted Joseph, but he did not listen to her. One day, however, when he went into the house to do his work and when none of the men of the household were at home, she caught hold of his garment and again tried to tempt him, but he left his garment in her hand and fled out of the house.
She kept his garment by her until his master came home; then she said to him, "The Hebrew slave whom you have brought to us came to me to insult me; and when I cried aloud, he left his garment with me and fled."
When Joseph's master heard what his wife said to him, he was very angry; and he took Joseph and put him into the prison, in the place where the king's prisoners were kept. So he was left there in prison. But the LORD was with Joseph and showed kindness to him and helped him to win the friendship of the keeper of the prison, so that he placed all the prisoners in Joseph's charge and made him responsible for whatever they did there.
After these things the butler of the king of egypt and his baker offended their master the king of Egypt, and pharaoh was so angry with these two officers that he put them in the same prison where Joseph was. And the captain of the guard appointed Joseph to wait on them; and they stayed in prison for some time.
And the butler and the baker of the king of Egypt, who were in the prison, both had dreams the same night, each with a different meaning. When Joseph came in to them in the morning, he saw plainly that they were sad. So he asked Pharaoh's officers, "Why do you look so sad to-day?" They answered, "We have had a dream, and there is no one who can tell what it means." Then Joseph said to them, "Is not God the one who knows what dreams mean? Tell them to me, if you will."
Then the chief butler told his dream to Joseph and said to him, "In my dream I saw a vine before me, and on the vine were three branches, and the buds put out blossoms, and its clusters brought forth ripe grapes. Pharaoh's cup was in my hand, and I took the grapes and squeezed the juice into his cup and gave the cup to Pharaoh."
Then Joseph said to him, "This is what it means: the three branches are three days. Within three days Pharaoh will let you out of prison and restore you to your office, and you will give Pharaoh's cup into his hand as you used to do when you were his butler. But when all goes well with you, remember me, show kindness to me and speak for me to Pharaoh and bring me out of this prison; for I was unjustly stolen from the land of the Hebrews, and here also I have done nothing that they should put me in the dungeon."
When the chief baker saw that the meaning of the butler's dream was good, he said to Joseph, "I also saw something in my dream: there were three baskets of white bread on my head, and in the upper basket there were all kinds of baked food for Pharaoh, and the birds were eating them out of the basket on my head." Joseph answered, "This is what it means: the three baskets are three days; within three days Pharaoh will take off your head and hang you on a tree, and the birds shall eat your flesh."
Now on the third day, which was Pharaoh's birthday, he made a feast for all his servants. Then he set free the chief butler and the chief baker. He restored the chief butler to his office, so that he again gave the cup to Pharaoh; but the chief baker he hanged, as Joseph had told them. Yet the chief butler did not remember Joseph, but forgot him.