After a sojourn of twenty-six years in the land of the Philistines, Abraham departed thence, and he settled in the neighborhood of Hebron. There he was visited by Abimelech with twenty of his grandees, who requested him to make an alliance with the Philistines.
As long as Abraham was childless, the heathen did not believe in his piety, but when Isaac was born, they said to him, "God is with thee." But again they entertained doubt of his piety when he cast off Ishmael. They said, "Were he a righteous man, he would not drive his first-born forth from his house." But when they observed the impious deeds of Ishmael, they said, "God is with thee in all thou doest." That Abraham was the favorite of God, they saw in this, too, that although Sodom was destroyed and all traffic had come to a standstill in that region, yet Abraham's treasure chambers were filled. For these reasons, the Philistines sought to form an alliance with him, to remain in force for three generations to come, for it is to the third generation that the love of a father extends.
Before Abraham concluded the covenant with Abimelech, king of the Philistines, he reproved him on account of a well, for "Correction leads to love," and "There is no peace without correction." The herdmen of Abraham and those of Abimelech had left their dispute about the well to decision by ordeal: the well was to belong to the party for whose sheep the waters would rise so that they could drink of them. But the shepherds of Abimelech disregarded the agreement, and they wrested the well for their own use. As a witness and a perpetual sign that the well belonged to him, Abraham set aside seven sheep, corresponding to the seven Noachian laws binding upon all men alike. But God said, "Thou didst give him seven sheep. As thou livest, the Philistines shall one day slay seven righteous men, Samson, Hophni, Phinehas, and Saul with his three sons, and they will destroy seven holy places, and they will keep the holy Ark in their country as booty of war for a period of seven months, and furthermore only the seventh generation of thy descendants will be able to rejoice in the possession of the land promised to them." After concluding the alliance with Abimelech, who acknowledged Abraham's right upon the well, Abraham called the place Beer-sheba, because there they swore both of them unto a covenant of friendship.
In Beer-sheba Abraham dwelt many years, and thence he endeavored to spread the law of God. He planted a large grove there, and he made four gates for it, facing the four sides of the earth, east, west, north, and south, and he planted a vineyard therein. If a traveller came that way, he entered by the gate that faced him, and he sat in the grove, and ate, and drank, until he was satisfied, and then he departed. For the house of Abraham was always open for all passers-by, and they came daily to eat and drink there. If one was hungry, and he came to Abraham, he would give him what he needed, so that he might eat and drink and be satisfied; and if one was naked, and he came to Abraham, he would clothe him with the garments of the poor man's choice, and give him silver and gold, and make known to him the Lord, who had created him and set him on earth. After the wayfarers had eaten, they were in the habit of thanking Abraham for his kind entertainment of them, whereto he would reply: "What, ye give thanks unto me! Rather return thanks to your host, He who alone provides food and drink for all creatures." Then the people would ask, "Where is He?" and Abraham would answer them, and say: "He is the Ruler of heaven and earth. He woundeth and He healeth, He formeth the embryo in the womb of the mother and bringeth it forth into the world, He causeth the plants and the trees to grow, He killeth and He maketh alive, He bringeth down to Sheol and bringeth up." When the people heard such words, they would ask, "How shall we return thanks to God and manifest our gratitude unto Him?" And Abraham would instruct them in these words: "Say, Blessed be the Lord who is blessed! Blessed be He that giveth bread and food unto all flesh!" In this manner did Abraham teach those who had enjoyed his hospitality how to praise and thank God. Abraham's house thus became not only a lodging-place for the hungry and thirsty, but also a place of instruction where the knowledge of God and His law were taught.