Genesis 26:17-35 King James Version (KJV)
17 And Isaac departed thence, and pitched his tent in the valley of Gerar, and dwelt there.
18 And Isaac digged again the wells of water, which they had digged in the days of Abraham his father; for the Philistines had stopped them after the death of Abraham: and he called their names after the names by which his father had called them.
19 And Isaac's servants digged in the valley, and found there a well of springing water.
20 And the herdmen of Gerar did strive with Isaac's herdmen, saying, The water is ours: and he called the name of the well Esek; because they strove with him.
21 And they digged another well, and strove for that also: and he called the name of it Sitnah.
22 And he removed from thence, and digged another well; and for that they strove not: and he called the name of it Rehoboth; and he said, For now the Lord hath made room for us, and we shall be fruitful in the land.
23 And he went up from thence to Beersheba.
24 And the Lord appeared unto him the same night, and said, I am the God of Abraham thy father: fear not, for I am with thee, and will bless thee, and multiply thy seed for my servant Abraham's sake.
25 And he builded an altar there, and called upon the name of the Lord, and pitched his tent there: and there Isaac's servants digged a well.
26 Then Abimelech went to him from Gerar, and Ahuzzath one of his friends, and Phichol the chief captain of his army.
27 And Isaac said unto them, Wherefore come ye to me, seeing ye hate me, and have sent me away from you?
28 And they said, We saw certainly that the Lord was with thee: and we said, Let there be now an oath betwixt us, even betwixt us and thee, and let us make a covenant with thee;
29 That thou wilt do us no hurt, as we have not touched thee, and as we have done unto thee nothing but good, and have sent thee away in peace: thou art now the blessed of the Lord.
30 And he made them a feast, and they did eat and drink.
31 And they rose up betimes in the morning, and sware one to another: and Isaac sent them away, and they departed from him in peace.
32 And it came to pass the same day, that Isaac's servants came, and told him concerning the well which they had digged, and said unto him, We have found water.
33 And he called it Shebah: therefore the name of the city is Beersheba unto this day.
34 And Esau was forty years old when he took to wife Judith the daughter of Beeri the Hittite, and Bashemath the daughter of Elon the Hittite:
35 Which were a grief of mind unto Isaac and to Rebekah.