Now when the traders took Joseph to Egypt, they sold him as a slave to a man named Potiphar, who was a captain over the king's guard. God was with Joseph and everything he did went well. Potiphar was pleased with him and put him in charge of his house and everything he owed. So God blessed everything that Potiphar had and Potiphar did not worry about anything.
Now Joseph was good-looking and after a while Potiphar's wife began to desire him and so she asked him to commit adultery with her. He refused and said, "How could I do such a wicked thing and sin against God?" But one day when he went into the house to do his work, none of the servants were there. She caught him by his robe and said, "Come to bed with me." But he left his robe behind and ran outside. Then she became angry and called for the servants. When they came in, she told a lie about Joseph, "He came in here to go to bed with me, but I cried out and so he left his robe and ran outside." She kept the robe with her until her husband came home and then she told him the same story. He became very angry with Joseph and had him thrown in the jail where the king's prisoners were kept.
But in jail God was still with Joseph and blessed him. The jailer was pleased with Joseph and so he put him in charge of all the other prisoners. Some time later the cupbearer and baker of the king of Egypt offended him and he had them thrown in the jail where Joseph was. They were in jail for some time and then one night they both had strange dreams. When Joseph came in the next morning, they were worried and so he asked them, "Why do you look so sad?" They said, "Both of us had a dream, and there is no one here to explain what the dreams mean." Joseph answered, "God gives the ability to explain dreams. Tell me your dream."
So the cupbearer said, "In my dream there was a grapevine in front of me with three branches on it. It budded and blossomed and the grapes ripened. I was holding the king's cup; so I squeezed the grapes into the cup and gave it to the king." Then Joseph said, "The three branches stand for three days. In three days the king will lift you up and give you back your job, and you will hand the king his cup like you did before. But please be kind enough to tell the king about me and try to get me out of this jail, for I have not done anything wrong and shouldn't be here."
When the baker saw that the dream had a good meaning, he said to Joseph, "I had a dream too. I was carrying three baskets of baked goods for the king on my head, but the birds were eating them out of the top basket." Then Joseph said, "The three baskets stand for three days. In three days the king will lift you up and hang you, and the birds will eat your body."
Three days later on his birthday, the king gave a feast and released the cupbearer and baker from jail. He gave the cupbearer back his old job and had the baker hanged. But the cupbearer forgot all about Joseph.
It was two years later that Pharaoh, the king of Egypt, had two dreams. He dreamed that he was standing by the Nile River when seven fat cows came up out of the river and began to eat the grass. Then seven thin cows came up out of the river and ate up the fat cows. But they didn't get any fatter. Then the king woke up. He fell asleep again and had another dream. He dreamed that seven fat heads of grain were growing on one plant. Then seven thin heads of grain came up and they swallowed the seven good heads. But they were just as thin as before. In the morning when the king woke up he was worried about the dreams. So he sent for the wise men of Egypt to explain what his dreams meant. But the wise men did not know what they meant.
Then the cupbearer said to the king, "Today I remember my faults. When you were angry at the baker and me and put us in jail, one night we both had dreams. A young Hebrew man told us what our dreams meant and things happened just as he said they would." So the king sent for Joseph and they brought him from prison. They king said to him, "I have had a dream and no one can explain it. I have heard that you can explain dreams." Joseph answered, "I cannot, but God will tell you what it means." So the king told Joseph his dreams. Then Joseph said, "The two dreams mean the same thing. God has told you what He is going to do. The seven fat cows and the seven fat heads of grain are seven good years when the crops will grow well. The seven thin cows and the seven thin heads of grain are seven bad years that will follow. Nothing will grow and they will be so bad that the seven good years will be forgotten. Therefore Pharaoh should choose a wise man to be in charge of collecting food during the good years and storing it up, so that it can be eaten during the seven bad years."
This seemed like a good idea to Pharaoh the king and so he said, "Where can we find a better man than this, whose has God's Spirit in him?" Then Pharaoh said to Joseph, "God has made you wise, so I will put you in charge of my country, and all my people will obey your orders. You will be second only to me." So the king put fine clothes on Joseph and a gold chain around his neck and made him governor of all Egypt. He also gave him a wife named Senath, the daughter of an Egyptian priest.
Joseph was thirty years old when he became governor of Egypt. For seven years he was in charge of collecting grain and storing it. During that time he had two sons and he named them Manasseh and Ephraim.