Genesis 20:3

3 aBut God came to Abimelech bin a dream by night and said to him, “Behold, you are a dead man because of the woman whom you have taken, for she is a man’s wife.”

Genesis 21:22-32

A Treaty with Abimelech

22At that time cAbimelech and Phicol the commander of his army said to Abraham, dGod is with you in all that you do. 23Now therefore swear to me here by God that you will not deal falsely with me or with my descendants or with my posterity, but eas I have dealt kindly with you, so you will deal with me and with the land where you have sojourned.” 24And Abraham said, “I will swear.”

25When Abraham reproved Abimelech about a well of water that Abimelech’s servants fhad seized, 26Abimelech said, “I do not know who has done this thing; you did not tell me, and I have not heard of it until today.” 27So Abraham took sheep and oxen and gave them to Abimelech, and the two men gmade a covenant. 28Abraham set seven ewe lambs of the flock apart. 29And Abimelech said to Abraham, “What is the meaning of these seven ewe lambs that you have set apart?” 30He said, “These seven ewe lambs you will take from my hand, that this
Or you
may be a witness for me that I dug this well.”
31Therefore ithat place was called Beersheba,
 Beersheba means well of seven or well of the oath
because there both of them swore an oath.
32So 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.
Copyright information for ESV