Genesis 39:20-23

20And Joseph’s master took him and a  put him into the b  prison, the place where the king’s prisoners were confined, and he was there in prison. 21But c  the  Lord was with Joseph and showed him steadfast love d  and gave him favor in the sight of the keeper of the prison. 22And the keeper of the prison e  put Joseph in charge of all the prisoners who were in the prison. Whatever was done there, he was the one who did it. 23The keeper of the prison paid no attention to anything that was in Joseph’s charge, because f  the  Lord was with him. And whatever he did, the  Lord made it succeed.

Genesis 40:1-2

Joseph Interprets Two Prisoners’ Dreams

1Some time after this, the g  cupbearer of the king of Egypt and his baker committed an offense against their lord the king of Egypt. 2And Pharaoh was angry with his two officers, the chief cupbearer and the chief baker,
Copyright information for ESV