At that time Abimelech and Phicol, chief of his troops, said to Abraham, "God is with you in everything that you do. Therefore swear to me here by God that you will not deal falsely with me or with my kith and kin, but will deal with me and with the land in which you have sojourned as loyally as I have dealt with you." And Abraham said, "I swear it."
Then Abraham reproached Abimelech for the well of water which the servants of Abimelech had seized. But Abimelech said, "I do not know who did this; you did not tell me, nor have I heard of it until today." Abraham took sheep and oxen and gave them to Abimelech, and the two of them made a pact. Abraham then set seven ewes of the flock by themselves, and Abimelech said to Abraham, "What mean these seven ewes which you have set apart?"
He replied, "You are to accept these seven ewes from me as proof that I dug this well." Hence that place was called Beer-sheba, for there the two of them swore an oath. When they had concluded the pact at Beer-sheba, Abimelech and Phicol, chief of his troops, departed and returned to the land of the Philistines. [Abraham] planted a tamarisk at Beer-sheba, and invoked there the name of the Lord, the Everlasting God. And Abraham resided in the land of the Philistines a long time.