Abraham traveled from there toward the land of the arid southern plain, and he settled as an immigrant in Gerar, between Kadesh and Shur.
References for Genesis 20:1
Abraham said of his wife Sarah, "She's my sister." So King Abimelech of Gerar took her into his household.
But God appeared to Abimelech that night in a dream and said to him, "You are as good as dead because of this woman you have taken. She is a married woman."
Now Abimelech hadn't gone near her, and he said, "Lord, will you really put an innocent nation to death?
Didn't he say to me, ‘She's my sister,' and didn't she—even she—say, ‘He's my brother'? My intentions were pure, and I acted innocently when I did this."
God said to him in the dream, "I know that your intentions were pure when you did this. In fact, I kept you from sinning against me. That's why I didn't allow you to touch her.
Now return the man's wife. He's a prophet; he will pray for you so you may live. But if you don't return her, know that you and everyone with you will die!"
Abimelech got up early in the morning and summoned all of his servants. When he told them everything that had happened, the men were terrified.
Then Abimelech summoned Abraham and said to him, "What have you done to us? What sin did I commit against you that you have brought this terrible sin to me and my kingdom, by doing to me something that simply isn't done?"
Abimelech said to Abraham, "What were you thinking when you did this thing?"
Abraham said, "I thought to myself, No one reveres God here and they will kill me to get my wife.
She is, truthfully, my sister—my father's daughter but not my mother's daughter—and she's now my wife.
When God led me away from my father's household, I said to her, ‘This is the loyalty I expect from you: in each place we visit, tell them, “He is my brother.”'"
Abimelech took flocks, cattle, male servants, and female servants, and gave them to Abraham; and Abimelech returned his wife Sarah.
Abimelech said, "My land is here available to you. Live wherever you wish."
To Sarah, he said, "I've given your brother one thousand pieces of silver. It means that neither you nor anyone with you has done anything wrong. Everything has been set right."
Abraham prayed to God; and God restored Abimelech, his wife, and his women servants to health, and they were able to have children.
Because of the incident with Abraham's wife Sarah, the LORD had kept all of the women in Abimelech's household from having children.