Genesis 39:20-23 NASB
So Joseph’s master took him and put him into the jail, the place where the king’s prisoners were confined; and he was there in the jail. But the LORD was with Joseph and extended kindness to him, and gave him favor in the sight of the chief jailer. The chief jailer committed to Joseph’s charge all the prisoners who were in the jail; so that whatever was done there, he was responsible for it. The chief jailer did not supervise anything under Joseph’s charge because the LORD was with him; and whatever he did, the LORD made to prosper.
NASB: New American Standard Bible