Genesis 26:12-33

Isaac’s treaty with the Philistines

12 Isaac planted grain in that land and reaped one hundred shearim that year because the LORD had blessed him.
13 Isaac grew richer and richer until he was extremely wealthy.
14 He had livestock, both flocks and cattle, and many servants. As a result, the Philistines envied him.
15 The Philistines closed up and filled with dirt all of the wells that his father's servants had dug during his father Abraham's lifetime.
16 Abimelech said to Isaac, "Move away from us because you have become too powerful among us."
17 So Isaac moved away from there, camped in the valley of Gerar, and lived there.
18 Isaac dug out again the wells that were dug during the lifetime of his father Abraham. The Philistines had closed them up after Abraham's death. Isaac gave them the same names his father had given them.
19 Isaac's servants dug wells in the valley and found a well there with fresh water.
20 Isaac's shepherds argued with Gerar's shepherds, each claiming, "This is our water." So Isaac named the well Esek because they quarreled with him.
21 They dug another well and argued about it too, so he named it Sitnah.
22 He left there and dug another well, but they didn't argue about it, so he named it Rehoboth and said, "Now the LORD has made an open space for us and has made us fertile in the land."
23 Then he went up from Gerar to Beer-sheba.
24 The LORD appeared to him that night and said, "I am the God of your father Abraham. Don't be afraid because I am with you. I will bless you, and I will give you many children for my servant Abraham's sake."
25 So Isaac built an altar there and worshipped in the LORD's name. Isaac pitched his tent there, and his servants dug a well.
26 But Abimelech set out toward him from Gerar, with Ahuzzath his ally and Phicol the commander of his forces.
27 Isaac said to him, "Why have you come after me? You resented me and sent me away from you."
28 They said, "We now see that the LORD was with you. We propose that there be a formal agreement between us and that we draw up a treaty with you:
29 you must not treat us badly since we haven't harmed you and since we have treated you well at all times. Then we will send you away peacefully, for you are now blessed by the LORD."
30 Isaac prepared a banquet for them, and they ate and drank.
31 They got up early in the morning, and they gave each other their word. Isaac sent them off, and they left peacefully.
32 That day Isaac's servants informed him about the well that they had been digging and said to him, "We found water."
33 He called it Shibah; therefore, the city's name has been Beer-sheba until today.