When Isaac grew up and was about to be weaned, Abraham prepared a huge feast to celebrate the occasion. But Sarah saw Ishmael—the son of Abraham and her Egyptian servant Hagar—making fun of her son, Isaac. So she turned to Abraham and demanded, “Get rid of that slave woman and her son. He is not going to share the inheritance with my son, Isaac. I won’t have it!”
This upset Abraham very much because Ishmael was his son. But God told Abraham, “Do not be upset over the boy and your servant. Do whatever Sarah tells you, for Isaac is the son through whom your descendants will be counted. But I will also make a nation of the descendants of Hagar’s son because he is your son, too.”
So Abraham got up early the next morning, prepared food and a container of water, and strapped them on Hagar’s shoulders. Then he sent her away with their son, and she wandered aimlessly in the wilderness of Beersheba.
When the water was gone, she put the boy in the shade of a bush. Then she went and sat down by herself about a hundred yards away. “I don’t want to watch the boy die,” she said, as she burst into tears.
But God heard the boy crying, and the angel of God called to Hagar from heaven, “Hagar, what’s wrong? Do not be afraid! God has heard the boy crying as he lies there. Go to him and comfort him, for I will make a great nation from his descendants.”
Then God opened Hagar’s eyes, and she saw a well full of water. She quickly filled her water container and gave the boy a drink.
And God was with the boy as he grew up in the wilderness. He became a skillful archer, and he settled in the wilderness of Paran. His mother arranged for him to marry a woman from the land of Egypt.
About this time, Abimelech came with Phicol, his army commander, to visit Abraham. “God is obviously with you, helping you in everything you do,” Abimelech said. “Swear to me in God’s name that you will never deceive me, my children, or any of my descendants. I have been loyal to you, so now swear that you will be loyal to me and to this country where you are living as a foreigner.”
Abraham replied, “Yes, I swear to it!” Then Abraham complained to Abimelech about a well that Abimelech’s servants had taken by force from Abraham’s servants.
“This is the first I’ve heard of it,” Abimelech answered. “I have no idea who is responsible. You have never complained about this before.”
Abraham then gave some of his sheep, goats, and cattle to Abimelech, and they made a treaty. But Abraham also took seven additional female lambs and set them off by themselves. Abimelech asked, “Why have you set these seven apart from the others?”
Abraham replied, “Please accept these seven lambs to show your agreement that I dug this well.” Then he named the place Beersheba (which means “well of the oath”), because that was where they had sworn the oath.
After making their covenant at Beersheba, Abimelech left with Phicol, the commander of his army, and they returned home to the land of the Philistines. Then Abraham planted a tamarisk tree at Beersheba, and there he worshiped the LORD, the Eternal God. And Abraham lived as a foreigner in Philistine country for a long time.