Genesis 21:22-34 NKJV
And it came to pass at that time that Abimelech and Phichol, the commander of his army, spoke to Abraham, saying, “God is with you in all that you do. Now therefore, swear to me by God that you will not deal falsely with me, with my offspring, or with my posterity; but that according to the kindness that I have done to you, you will do to me and to the land in which you have dwelt.”
And Abraham said, “I will swear.”
Then Abraham rebuked Abimelech because of a well of water which Abimelech’s servants had seized. And Abimelech said, “I do not know who has done this thing; you did not tell me, nor had I heard of it until today.” So Abraham took sheep and oxen and gave them to Abimelech, and the two of them made a covenant. And Abraham set seven ewe lambs of the flock by themselves.
Then Abimelech asked Abraham, “What is the meaning of these seven ewe lambs which you have set by themselves?”
And he said, “You will take these seven ewe lambs from my hand, that they may be my witness that I have dug this well.” Therefore he called that place Beersheba, because the two of them swore an oath there.
Thus they made a covenant at Beersheba. So Abimelech rose with Phichol, the commander of his army, and they returned to the land of the Philistines. Then Abraham planted a tamarisk tree in Beersheba, and there called on the name of the LORD, the Everlasting God. And Abraham stayed in the land of the Philistines many days.
NKJV: New King James Version