Genesis 39:20-23

ISV(i) 20 arrested Joseph, and locked him up in the same prison where the king’s prisoners were confined. So Joseph remained there in prison.
21 But the LORD was with Joseph. He extended gracious love to him, causing the prison warden to be pleased with Joseph. 22 So the prison warden entrusted into Joseph’s care all the prisoners who were confined in prison. Whatever they did, Joseph was in charge of the work detail. 23 The prison warden did not have to worry about anything under Joseph’s care, because the LORD was with him. That’s why Joseph prospered in everything he did.