There was a famine in the land, as bad as the famine during the time of Abraham. And Isaac went down to Abimelech, king of the Philistines, in Gerar.
God appeared to him and said, "Don't go down to Egypt; stay where I tell you.
Stay here in this land and I'll be with you and bless you. I'm giving you and your children all these lands, fulfilling the oath that I swore to your father Abraham.
I'll make your descendants as many as the stars in the sky and give them all these lands. All the nations of the Earth will get a blessing for themselves through your descendants.
And why? Because Abraham obeyed my summons and kept my charge - my commands, my guidelines, my teachings."
So Isaac stayed put in Gerar.
The men of the place questioned him about his wife. He said, "She's my sister." He was afraid to say "She's my wife." He was thinking, "These men might kill me to get Rebekah, she's so beautiful."
One day, after they had been there quite a long time, Abimelech, king of the Philistines, looked out his window and saw Isaac fondling his wife Rebekah.
Abimelech sent for Isaac and said, "So, she's your wife. Why did you tell us 'She's my sister'?" Isaac said, "Because I thought I might get killed by someone who wanted her."
Abimelech said, "But think of what you might have done to us! Given a little more time, one of the men might have slept with your wife; you would have been responsible for bringing guilt down on us."
Then Abimelech gave orders to his people: "Anyone who so much as lays a hand on this man or his wife dies."
Isaac planted crops in that land and took in a huge harvest. God blessed him.
The man got richer and richer by the day until he was very wealthy.
He accumulated flocks and herds and many, many servants, so much so that the Philistines began to envy him.
They got back at him by throwing dirt and debris into all the wells that his father's servants had dug back in the days of his father Abraham, clogging up all the wells.
Finally, Abimelech told Isaac: "Leave. You've become far too big for us."
So Isaac left. He camped in the valley of Gerar and settled down there.
Isaac dug again the wells which were dug in the days of his father Abraham but had been clogged up by the Philistines after Abraham's death. And he renamed them, using the original names his father had given them.
One day, as Isaac's servants were digging in the valley, they came on a well of spring water.
The shepherds of Gerar quarreled with Isaac's shepherds, claiming, "This water is ours." So Isaac named the well Esek (Quarrel) because they quarreled over it.
They dug another well and there was a difference over that one also, so he named it Sitnah (Accusation).
He went on from there and dug yet another well. But there was no fighting over this one so he named it Rehoboth (Wide-Open Spaces), saying, "Now God has given us plenty of space to spread out in the land."
From there he went up to Beersheba.
That very night God appeared to him and said, I am the God of Abraham your father; don't fear a thing because I'm with you. I'll bless you and make your children flourish because of Abraham my servant.
Isaac built an altar there and prayed, calling on God by name. He pitched his tent and his servants started digging another well.
Then Abimelech came to him from Gerar with Ahuzzath his advisor and Phicol the head of his troops.
Isaac asked them, "Why did you come to me? You hate me; you threw me out of your country."
They said, "We've realized that God is on your side. We'd like to make a deal between us - a covenant
that we maintain friendly relations. We haven't bothered you in the past; we treated you kindly and let you leave us in peace. So - God's blessing be with you!"
Isaac laid out a feast and they ate and drank together.
Early in the morning they exchanged oaths. Then Isaac said good-bye and they parted as friends.
Later that same day, Isaac's servants came to him with news about the well they had been digging, "We've struck water!"
Isaac named the well Sheba (Oath), and that's the name of the city, Beersheba (Oath-Well), to this day.
When Esau was forty years old he married Judith, daughter of Beeri the Hittite, and Basemath, daughter of Elon the Hittite.
They turned out to be thorns in the sides of Isaac and Rebekah.