Genesis 26:17-33 New Revised Standard Version (NRSV)
17 So Isaac departed from there and camped in the valley of Gerar and settled there. 18 Isaac dug again the wells of water that had been dug in the days of his father Abraham; for the Philistines had stopped them up after the death of Abraham; and he gave them the names that his father had given them. 19 But when Isaac’s servants dug in the valley and found there a well of spring water, 20 the herders of Gerar quarreled with Isaac’s herders, saying, “The water is ours.” So he called the well Esek,[a] because they contended with him. 21 Then they dug another well, and they quarreled over that one also; so he called it Sitnah.[b] 22 He moved from there and dug another well, and they did not quarrel over it; so he called it Rehoboth,[c] saying, “Now the Lord has made room for us, and we shall be fruitful in the land.”
23 From there he went up to Beer-sheba. 24 And that very night the Lord appeared to him and said, “I am the God of your father Abraham; do not be afraid, for I am with you and will bless you and make your offspring numerous for my servant Abraham’s sake.” 25 So he built an altar there, called on the name of the Lord, and pitched his tent there. And there Isaac’s servants dug a well.
26 Then Abimelech went to him from Gerar, with Ahuzzath his adviser and Phicol the commander of his army. 27 Isaac said to them, “Why have you come to me, seeing that you hate me and have sent me away from you?” 28 They said, “We see plainly that the Lord has been with you; so we say, let there be an oath between you and us, and let us make a covenant with you 29 so that you will do us no harm, just as we have not touched you and have done to you nothing but good and have sent you away in peace. You are now the blessed of the Lord.” 30 So he made them a feast, and they ate and drank. 31 In the morning they rose early and exchanged oaths; and Isaac set them on their way, and they departed from him in peace. 32 That same day Isaac’s servants came and told him about the well that they had dug, and said to him, “We have found water!” 33 He called it Shibah;[d] therefore the name of the city is Beer-sheba[e] to this day.