What does Genesis 26:31 mean?
Early in his stay in Gerar, Isaac did poorly at developing his relationship with the people. His lie about his wife, Rebekah, brought the anger of the king (Genesis 26:6–11). This same king later asked Isaac to leave the area out of jealousy and fear over his prosperity (Genesis 26:14–16). Even then, locals disputed with Isaac about rights to water (Genesis 26:18–22). For these reasons, when the king and his advisors arrive to see Isaac in Beersheba (Genesis 26:23–26), Isaac is understandably skeptical (Genesis 26:27).After their reassurances and explanation, Isaac has agreed to make a covenant of peace with King Abimelech and the Philistines (Genesis 26:28–30). After a night of feasting and drinking, both now take their oaths to do the other no harm. They will co-exist, with Isaac and his large company living near Beersheba. Isaac then sends them away, back to Gerar, in peace and with no further animosity between them.
Abraham made a similar peace treaty, also with the king of Gerar, in Genesis 21.