Genesis 39:21
But the LORD was with Joseph, and shewed him mercy, and gave him favour in the sight of the keeper of the prison.
But the Lord was with Joseph,.... Comforting him with his presence under his afflictions; supporting him with his right hand; sanctifying all his troubles to him, and so causing him to bear them patiently and cheerfully:
and showed him mercy, and gave him favour in the sight of the keeper of the prison; who was the underkeeper to Potiphar; God so wrought upon the heart of this man, that he was merciful to him, and took off the iron fetters, which hurt his feet, and gave him liberty to walk about; and many other favours and kindnesses he showed unto him, as follow.