"At that time Abimelek and Phicol the commander of his forces said to Abraham, 'God is with you in everything you do. Now swear to me here before God that you will not deal falsely with me or my children or my descendants. Show to me and the country where you now reside as a foreigner the same kindness I have shown to you.' Abraham said, 'I swear it.'" NIV translation
Now, the king proposes a treaty with Abraham and Abraham agrees to it. We see that the king does this because he knows that God is with Abraham and he now fears God. This is a reminder to us that there can be no peace without the presence of God. In our world today, man is trying to create a Mideast Peace Plan but we need to remember this example of Abraham and Abimelek.
"Then Abraham complained to Abimelek about a well of water that Abimelek's servants had seized. But Abimelek said, 'I don't know who has done this. You did not tell me, and I heard about it only today.'" NIV translation
We see that, after the agreement, it was possible to settle their differences in a peaceful way. The same is true today, in that, other issues can be settled only after the acknowledgement that God is with Israel. It is also the same with us, as Christians. The persecution of Christians will continue until all men fear God and see that He is with us in all we do.
"So Abraham brought sheep and cattle and gave them to Abimelek, and the two made a treaty. Abraham set apart seven ewe lambs from the flock, and Abimelek asked Abraham, 'What is the meaning of these seven ewe lambs you have set apart by themselves?' He replied, 'Accept these seven lambs from my hand as a witness that I dug this well.'" NIV translation
Abraham provided the animals for the treaty ceremony (see Genesis 15). He also presented Abimelek with a good faith offering concerning the matter of the disputed well.
"So that place was called Beersheba because the two men swore an oath there." NIV translation
The place where they made this covenant became known as Beersheba which roughly means "well of the oath".