Genesis 39:17-21 Amplified Bible (AMP)

17. Then she told him the same story, saying, The Hebrew servant whom you brought among us came to me to mock and insult me.

18. And when I screamed and cried, he left his garment with me and fled out [of the house].

19. And when [Joseph's] master heard the words of his wife, saying to him, This is the way your servant treated me, his wrath was kindled.

20. And Joseph's master took him and put him in the prison, a place where the state prisoners were confined; so he was there in the prison.

21. But the Lord was with Joseph, and showed him mercy and loving-kindness and gave him favor in the sight of the warden of the prison.

Genesis 39