After Joseph had been taken to Egypt by the Ishmaelites, Potiphar an Egyptian, one of Pharaoh's officials and the manager of his household, bought him from them.
As it turned out, God was with Joseph and things went very well with him. He ended up living in the home of his Egyptian master.
His master recognized that God was with him, saw that God was working for good in everything he did.
He became very fond of Joseph and made him his personal aide. He put him in charge of all his personal affairs, turning everything over to him.
From that moment on, God blessed the home of the Egyptian - all because of Joseph. The blessing of God spread over everything he owned, at home and in the fields,
and all Potiphar had to concern himself with was eating three meals a day.
As time went on, his master's wife became infatuated with Joseph and one day said, "Sleep with me."
He wouldn't do it. He said to his master's wife, "Look, with me here, my master doesn't give a second thought to anything that goes on here - he's put me in charge of everything he owns.
He treats me as an equal. The only thing he hasn't turned over to me is you. You're his wife, after all! How could I violate his trust and sin against God?"
She pestered him day after day after day, but he stood his ground. He refused to go to bed with her.
On one of these days he came to the house to do his work and none of the household servants happened to be there.
She grabbed him by his cloak, saying, "Sleep with me!" He left his coat in her hand and ran out of the house.
When she realized that he had left his coat in her hand and run outside,
she called to her house servants: "Look - this Hebrew shows up and before you know it he's trying to seduce us. He tried to make love to me but I yelled as loud as I could.
With all my yelling and screaming, he left his coat beside me here and ran outside."
She kept his coat right there until his master came home.
She told him the same story. She said, "The Hebrew slave, the one you brought to us, came after me and tried to use me for his plaything.
When I yelled and screamed, he left his coat with me and ran outside."
When his master heard his wife's story, telling him, "These are the things your slave did to me," he was furious.
Joseph's master took him and threw him into the jail where the king's prisoners were locked up. But there in jail
God was still with Joseph: He reached out in kindness to him; he put him on good terms with the head jailer.
The head jailer put Joseph in charge of all the prisoners - he ended up managing the whole operation.
The head jailer gave Joseph free rein, never even checked on him, because God was with him; whatever he did God made sure it worked out for the best.