But the LORD was with Joseph and showed him steadfast love and gave him favor in the sight of the keeper of the prison.
Genesis 39:21 · ESVView all translations

Joseph has just been thrown into the king's prison on a false charge. The verse answers that injustice not with rescue but with a Person, and commentators ask why God's steadfast love reached Joseph inside the cell instead of lifting him out.

The Same Words in a New Place

Earlier the same chapter said the LORD was with Joseph in Potiphar's house. It says it again here, after Joseph has lost everything he had. One writer shows what that repeat means.

Once again he comes into suffering. Once again he is misrepresented and slandered, though he deserves none of it, and thrown quickly into the dungeon. But Jehovah was with Joseph in the prison, just as much as in Potiphar's house. It mattered little where he was, since Jehovah was with him. What a difference it makes when God is with us — and God in that special relationship His people know, which the name "Jehovah" carries here as everywhere.

William Kelly (his translation reads "Jehovah" where the ESV has "the LORD")

Mercy You Could See

The verse does not leave God's kindness as a feeling. It names the shape it took.

The Lord was with him as much in the time and place of his trouble as He had been in the days when he did well in Potiphar's house and estate. As a result He showed mercy to him. That mercy took the form of bringing him into the favour of the keeper of the prison, who clearly held absolute power within his own limited area.

F. B. Hole

Which prison it was mattered too.

He was put into that particular prison, "the place where the king's prisoners were confined." This proved to be a link in the chain of circumstances that connected him with ultimate triumph. Had it been another prison he would never have met the butler and baker who had offended the king.

F. B. Hole

The Chains Stayed On

God's favour did not cancel the suffering. Psalm 105 fills in what Genesis leaves unsaid about those years.

We learn how terrible this experience was from Psalm 105:18. Speaking of Joseph, it says, "his feet were hurt with fetters; his neck was put in a collar of iron." The margin of the Bible says, "his soul came into iron." Nothing is more depressing than captivity like that — day after day, night after night, summer and winter, year in and year out. The weariness, discomfort, sameness and hopelessness of it is a great test. Under it character either collapses or comes out.

A. J. Pollock

Kept From Souring

Long injustice often makes a man bitter. Joseph stayed useful instead, and the jailer could see it.

How good it is that everyone who suffers for righteousness' sake will have the Lord's gracious sympathy. He will not give him up to self-pity and depression. The chief jailer of course saw that Joseph was an honorable man, not a common criminal. He soon trusted Joseph with unusual responsibilities for a prisoner. We are told again that the Lord was with Joseph and made whatever he did prosper. It may seem strange that this could be true of a prisoner, but it does show that Joseph was not a negative man, but positive and faithful.

Leslie M. Grant

Someone Was Working the Machinery

Two people stood behind Joseph's imprisonment. Neither of them was in charge.

Satan uses Potiphar's wife, and later he uses Pharaoh's chief butler. The first he used to put Joseph into the dungeon; the second he used to keep him there, through his ungrateful forgetfulness. But it was all in vain. God was behind the scenes. His finger was guiding every spring of the vast machine of circumstances. When the right time came, He brought out the man He had purposed and set that man's feet in a large room.

C. H. Mackintosh

The Simple Sum

Joseph had known a fine house without freedom, and now a cell with God in it.

Before this in Potiphar's home, God made everything go well. Now while Joseph was in the prison, God did the same. It is much better to live in a prison with God, than to live in a king's house without Him.

G. C. Willis

The Larger Shadow

One writer sees more here than Joseph's own story.

Joseph had now tasted the bitterness of both the pit and the prison. Taken together they foreshadow Christ going down into death because of the hatred of men. But there the power of His hand was felt.

F. B. Hole

Summary

- Presence first. The same words cover the mansion and the dungeon. The LORD was with Joseph in both, so the place mattered little.

- Presence shows. God's mercy took a visible form. It gave Joseph favour with the keeper of the prison, who held total power in his own small world.

- Presence positions. He was in the one prison that held the king's offenders, the link that connected him with his later triumph.

- Presence preserves. Fetters and years of sameness test a man's character. The Lord's sympathy kept Joseph from self-pity and depression.

- Presence prevails. One woman put him in. One ungrateful man kept him there. Both failed, because God was behind the scenes and brought out His man at the right time.

Reviewed by Orion on August 30, 2026