After the destruction of Sodom and Gomorrah, Abraham left Mamre and moved south to Gerar. Abraham told Sarah to tell the people that she was his sister, just like he did in Egypt. Had he not learned his lesson the last time he tried this?
Abimelech was the king of Gerar and decided to take Sarah as his wife because she was beautiful. At this time, Sarah would be 89 years old and still very attractive. So, the king took Sarah, but God prevented Abimelech from touching her. God visited Abimelech at night, telling him that Sarah was the wife of Abraham. Abimelech pled his innocence, and God told Abimelech that was why He had spared the king from sinning with Sarah.
Abimelech returned Sarah to Abraham and asked why Abraham would do such a thing. Abraham explains that he saw no fear of God in Gerar, and he did not know what the people would do to him because of Sarah’s beauty.
It is here that we find out that Sarah is the half-sister of Abraham. They have the same father. Abraham and Sarah, neither one was lying. And verse 13 sounds like this was the arrangement they had whenever they came to a new land.
Abimelech gave Abraham money, livestock, and servants and told him he could live anywhere in the land that he wanted. Abraham may have seen no fear of God in the people before, but they had a newfound respect for God after the nighttime visit from the Almighty. And Abraham and Abimelech became friends.