Genesis 20:1-9

1 Abraham moved to the Negev and settled between Kadesh and Shur. While he was living in Gerar,
2 Abraham told everyone that his wife Sarah was his sister. So King Abimelech of Gerar sent men to take Sarah.
3 God came to Abimelech in a dream one night and said to him, "You're going to die because of the woman that you've taken! She's a married woman!"
4 Abimelech hadn't come near her, so he asked, "Lord, will you destroy a nation even if it's innocent?
5 Didn't he tell me himself, 'She's my sister,' and didn't she even say, 'He's my brother'? I did this in all innocence and with a clear conscience."
6 "Yes, I know that you did this with a clear conscience," God said to him in the dream. "In fact, I kept you from sinning against me. That's why I didn't let you touch her.
7 Give the man's wife back to him now, because he's a prophet. He will pray for you, and you will live. But if you don't give her back, you and all who belong to you are doomed to die."
8 Early in the morning Abimelech called together all his officials. He told them about all of this, and they were terrified.
9 Then Abimelech called for Abraham and asked him, "What have you done to us? How have I sinned against you that you would bring such a serious sin on me and my kingdom? You shouldn't have done this to me."