Genesis 21:22-34 ESV
At that time Abimelech and Phicol the commander of his army said to Abraham, “God is with you in all that you do. Now therefore swear to me here by God that you will not deal falsely with me or with my descendants or with my posterity, but as I have dealt kindly with you, so you will deal with me and with the land where you have sojourned.” And Abraham said, “I will swear.” When Abraham reproved Abimelech about a well of water that Abimelech’s servants had seized, Abimelech said, “I do not know who has done this thing; you did not tell me, and I have not heard of it until today.” So Abraham took sheep and oxen and gave them to Abimelech, and the two men made a covenant. Abraham set seven ewe lambs of the flock apart. And Abimelech said to Abraham, “What is the meaning of these seven ewe lambs that you have set apart?” He said, “These seven ewe lambs you will take from my hand, that this may be a witness for me that I dug this well.” Therefore that place was called Beersheba, because there both of them swore an oath. So they made a covenant at Beersheba. Then Abimelech and Phicol the commander of his army rose up and returned to the land of the Philistines. Abraham planted a tamarisk tree in Beersheba and called there on the name of the LORD, the Everlasting God. And Abraham sojourned many days in the land of the Philistines.