John Calvin's Bible Commentary
Genesis 21:22
22.And it came to pass at that time. Moses relates, that this covenant was entered into between Abraham and Abimelech, for the purpose of showing, that after various agitations, some repose was, at length, granted to the holy man. He had been constrained, as a wanderer, and without a fixed abode, to move his tent from place to place, during sixty years. But although God would have him to be a sojourner even unto death, yet, under king Abimelech, he granted him a quiet habitation. And it is the design of Moses to show, how it happened, that he occupied one place longer than he was wont. The circumstance of time is to be noted; namely, soon after he had dismissed his son. For it seems that his great trouble was immediately followed by this consolation, not only that he might have some relaxation from continued inconveniences, but that he might be the more cheerful, and might the more quietly occupy himself in the education of his little son Isaac. It is however certain, that the covenant was not, in every respect, an occasion of joy to him; for he perceived that he was tried by indirect methods, and that there were many persons in that region, to whom he was disagreeable and hateful. The king, indeed openly avowed his own suspicions of him: it was, however, the highest honor, that the king of the place should go, of his own accord, to a stranger, to enter into a covenant with him. Yet it may be asked, whether this covenant was made on just and equal conditions, as is the custom among allies? I certainly do not doubt, that Abraham freely paid due honor to the king; nor is it probable that the king intended to detract anything from his own dignity, in order to confer it upon Abraham. What, then, did he do? Truly, while he allowed Abraham a free dwelling-place, he would yet hold him bound to himself by an oath.
God is with thee in all that thou doest. He commences in friendly and bland terms; he does not accuse Abraham nor complain that he had neglected any duty towards himself, but declares that he earnestly desires his friendship; still the conclusion is, that he wishes to be on his guard against him. It may then be asked, Whence had he this suspicion, or fear, first of a stranger, and, secondly, of an honest and moderate man? In the first place, we know that the heathen are often anxious without cause, and are alarmed even in seasons of quiet. Next, Abraham was a man deserving of reverence; the number of servants in his house seemed like a little nation; and there is no doubt, that his virtues would acquire for him great dignity; hence it was, that Abimelech suspected his power. But whereas Abimelech had a private consideration for himself in this matter; the Lord, who best knows how to direct events, provided, in this way, for the repose of his servant. We may, however, learn, from the example of Abraham, if, at any time, the gifts of God excite the enmity of the men of this world against us, to conduct ourselves with such moderation, that they may find nothing amiss in us.