Finally, Abimelech said to Isaac, "Go away from us! You've become more powerful than we are."
So Isaac moved away. He set up his tents in the Gerar Valley and lived there.
He dug out the wells that had been dug during his father Abraham's lifetime. The Philistines had filled them in after Abraham's death. He gave them the same names that his father had given them.
Isaac's servants dug in the valley and found a spring-fed well.
The herders from Gerar quarreled with Isaac's herders, claiming, "This water is ours!" So Isaac named the well Esek [Argument], because they had argued with him.
Then they dug another well, and they quarreled over that one too. So Isaac named it Sitnah [Accusation].
He moved on from there and dug another well. They didn't quarrel over this one. So he named it Rehoboth [Roomy] and said, "Now the LORD has made room for us, and we will prosper in this land."
He went from there to Beersheba.
That night the LORD appeared to Isaac, and said, "I am the God of your father Abraham. Don't be afraid, because I am with you. I will bless you and increase the number of your descendants for my servant Abraham's sake."
So Isaac built an altar there and worshiped the LORD. He also pitched his tent in that place, and his servants dug a well there.
Abimelech, his friend Ahuzzath, and Phicol, the commander of his army, came from Gerar to see Isaac.
Isaac asked them, "Why have you come to me, since you hate me and sent me away from you?"
They answered, "We have seen that the LORD is with you. So we thought, 'There should be a solemn agreement between us.' We'd like to make an agreement with you
that you will not harm us, since we have not touched you. We have done only good to you and let you go in peace. Now you are blessed by the LORD."
Isaac prepared a special dinner for them, and they ate and drank.
Early the next morning they exchanged oaths. Then Isaac sent them on their way, and they left peacefully.
That same day Isaac's servants came and told him about a well they had dug. They said to him, "We've found water."
So he named it Shibah [Oath]. That is why the name of the city is still Beersheba today.
When Esau was 40 years old, he married Judith, daughter of Beeri the Hittite. He also married Basemath, daughter of Elon the Hittite.
These women brought Isaac and Rebekah a lot of grief.