At that time Abimelech and Phicol spoke to Abraham. Phicol was the commander of Abimelech's army. They said, "God is with you in everything you do.
References for Genesis 21:22
Now make a promise to me here while God is watching. Take an oath that you will treat me fairly. Promise that you will treat my children and their children the same way. "I've been kind to you. Now you be kind to me. And be kind to the country where you are living as an outsider."
Abraham said, "I promise with an oath that I'll do it."
Then Abraham objected to Abimelech about what Abimelech's servants had done. They had taken over a well of water.
But Abimelech said, "I don't know who has done this. You didn't tell me. Today is the first time I heard about it."
So Abraham gave Abimelech sheep and cattle. The two men made a peace treaty.
Then Abraham took out seven female lambs from his flock.
Abimelech asked Abraham, "What's the meaning of these seven female lambs? Why have you taken them out and put them by themselves?"
Abraham replied, "Accept the seven lambs from me. They will be a witness that I dug this well."
That place was named Beersheba. That's because there the two men made a promise with an oath.
After the peace treaty had been made at Beersheba, Abimelech went back to the land of the Philistines. His army commander Phicol went with him.
Abraham planted a tamarisk tree in Beersheba. There he worshiped the Lord, the God who lives forever.
Abraham stayed in the land of the Philistines for a long time.